[Closed] how to do incremental rotation using script Controller
Hi,
I want to rotate a object’s z axise through animating a parameter(RotatSpeed), so I and a script to the object’s z rotation controller.
Here is the script:
RotZ = RotateSpeed*145/60/24*360*0.01
Node.Rotation.Z_Rotation + RotZ
But I can not get a linear rotation.
I’m not familiar with max script, please tell where is the wrong?
Thanks!
It’s the kind of thing that either needs to be history dependant or turned into a bake-style script. With the history dependent version, every time you need to calculate the rotation, the script controller has to calculate the rotation value of every frame since the start of the animation so it knows where it needs to be to be able to add the new rotation value. This can obviously get very slow. The other way is to run a script that will bake the rotation to keyframes so it only has to calculate it at the time of the bake. But of course this will need to be rebaked if variables change.
Cg.