JYoung
11-05-2007, 04:52 AM
Ok, I have a very basic understanding of expressions and I'm trying to learn more. One thing I need/want to do is setup an attribute called "speed" that dictates how fast an object rotates on a robot. It's basically just like a rotary toothbrush or something like that.
Anywho, upon searching, I've found similar questions asked and haven't found a straight answer. From what I've read, the following types of expressions have been suggested:
pCylinder1.rotateY = pCylinder1.speed * 360 * time; or
pCylinder1.rotateY = frame * 5 *pCylinder1.speed;
where .speed is the speed attribute that I want to drive the object's rotation. This works somewhat, but keying the speed from say 0-5-0 makes the object rotate forwards and then backwards til it reaches zero.
Basically, I'd like to be able to key the speed from 0-10(or whatever I set the limit at) and then be able to key it back to zero but just have it slow down to a standstill and not rotate all the way back to 0 degrees.
I hope that makes sense and it seems like it should be easy enough. Thanks!
Anywho, upon searching, I've found similar questions asked and haven't found a straight answer. From what I've read, the following types of expressions have been suggested:
pCylinder1.rotateY = pCylinder1.speed * 360 * time; or
pCylinder1.rotateY = frame * 5 *pCylinder1.speed;
where .speed is the speed attribute that I want to drive the object's rotation. This works somewhat, but keying the speed from say 0-5-0 makes the object rotate forwards and then backwards til it reaches zero.
Basically, I'd like to be able to key the speed from 0-10(or whatever I set the limit at) and then be able to key it back to zero but just have it slow down to a standstill and not rotate all the way back to 0 degrees.
I hope that makes sense and it seems like it should be easy enough. Thanks!
