Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Lane on May 15, 2013, 03:00:53 PM

Title: Rotational Torque Velocity?
Post by: Lane on May 15, 2013, 03:00:53 PM
How do I get the velocity of an object's rotation?

For instance I can Add Force something in a direction and use Get Velocity to measure it's speed. How do I do this for rotations? I don't see how to use Get Velocity with Add Torque for this purpose.

I really just need some number to represent its rotation speed and scale properly, not necessarily be an accurate speed or anything.

Thanks
Title: Re: Rotational Torque Velocity?
Post by: jeanfabre on May 16, 2013, 02:48:16 PM
Hi,

 To get the speed of any value changing over time is simply a matter of getting the delta change on each frame and divide it by the delta time.

 so, have a fsm that gets the delta rotation ( the current rotation - the last one), and also get the deltatime ( using the action "getTimeinfo"), your rotation speed with be Delta rotation/delta time.

 Try to play around with this, meanwhile, I'll see if I can do a custom action to do that tomorrow. Please bump this next week if you haven't heard back. a bit pressed at the moment :)

bye,

 Jean
Title: Re: Rotational Torque Velocity?
Post by: Lane on May 16, 2013, 02:52:30 PM
I figured something along those lines was how I could do it, but was hoping there was another way.

I'll keep experimenting and try that out.

Thanks
Title: Re: Rotational Torque Velocity?
Post by: Groo Gadgets on July 03, 2013, 11:20:15 PM
Hey Jean,

Just bumping this thread, a custom action would be great. Any chance of doing this for us?

Cheers,

Simon
Title: Re: Rotational Torque Velocity?
Post by: jeanfabre on July 04, 2013, 06:45:57 AM
Hi,

 actually, check this, it's there already:

http://hutonggames.com/playmakerforum/index.php?topic=2493.msg11092#msg11092

http://hutonggames.com/playmakerforum/index.php?topic=3031.msg13835#msg13835

bye,

 Jean