View Full Version : Rotational Slider?

08-27-2015, 01:02 AM
I'm sure this isnt that hard, but my frazzled brain aint coming up with it.

I created a Master Channel called ON, and when I animate it to 1 - I want particles from one object to emit, and another Fan object to start spinning.
Back down to zero and they both come to a stop.

The particles I got (well atleast I'm pretty sure I can rig that direct relation) but the fan is confusing me. As I increase my ON, fan Pitch increases each frame by
Rate x ON, and then when I drop ON back to 0 the fan pitch comes to a stop where ever it got to. Then increases more later... (it always spins the same way)

How do I write this expression to add to my pitch, and then leave it there?


08-27-2015, 01:33 AM
Why would you do it like this? Why not just animate it without any relations. LW is not a game engine ;).

08-27-2015, 01:49 AM
Because I probably will end up having a few other lights come ON and maybe a few more moving parts. I don't want to have to animate all 6 of those parts every time I turn it on and off. And then keep track of syncing all of them when I adjust my timing a bunch...

08-27-2015, 02:48 AM
Good reason! :). Maybe you could add dynamics to the fans to make them spin. I don't know how to do it with expressions off the top of my head.

Edit: I checked whether it is possible to use expressions on dynamic motors but it seems like LW isn't updating the channel modifiers during dynamic calculations. I wrote this expression [Value.Position.X]>0?100:0 That should give the motor some force when the Value Null object has a value higher than 0..... But nothing happens.

Edit: Got it.... Need to set "Initial activation in the dynamic properties to Always active".

08-27-2015, 03:48 AM
Here is the scene...

08-28-2015, 12:31 PM
Thanks Every4th!

Just for my own mathematic curiosity, I would still like to know how to set this up via expressions if anyone has it sorted out.

08-28-2015, 01:30 PM
It sounds like you're trying to make a throttle control. I never figured it out with expressions...there is a script that lets you do throttle type of control.

08-28-2015, 02:33 PM
I think the basic problem with trying to do this with Expressions is that they don't allow any sort of "global variable" which retains its value across invocations. So, trying to store the ending pitch / rotation to be used as the initial start rotation the next time is a problem.

I think the closest you can come with expressions is to set up the pitch rotation in 20-frame (or other frame count) "chunks", and then make sure you turn ON / OFF the Master only on 20-frame units. In other words, if the fan rotates 360 degrees every 20 frames (with Linear Post Behavior), you can turn ON the master at 20, 40, 60..., and off on another 20-frame boundary, and the fan will stop in the same position. Of course, always stopping in the same position might be noticable.

An LScript can store a value in a global variables across invocations, so that might be a better solution.


08-28-2015, 03:37 PM
Worley Labs had a throttle control ...Channel Modifier I think it was.

Also, check the Relativity toolset (you already paid for it, why not?), it might have something.

And: https://www.youtube.com/watch?v=1ZYD-AntO3E

Really, just getting the word "throttle" is a huge help. --Also, don't neglect other softwares that have expressions-- more than likely you can pilfer their concepts.

08-28-2015, 03:40 PM
Also, this: http://forums.newtek.com/showthread.php?133455-Need-help-with-propeller-speed-control&highlight=throttle

08-30-2015, 09:40 AM
You could also do it with "same as item". You just need to make an object that rotates constantly and blend that motion to a static item. The only problem with that is that it tries to catch up if you blend it back to the animated item. The dynamic scene seem to work really nice.