PlayMaker Feedback > Action Requests
Get GameObject Rotation Speed and Rotation Vector (no physics)[SOLVED]
Kubold:
Hey!
Is it possible to do a Get Rotation Speed and Rotation Vector Action for non-rigid bodies, similar to GetGameObjectSpeed.cs:
http://hutonggames.com/playmakerforum/index.php?topic=1182.msg4961#msg4961
I need it to transfer the motion from non-rigid body to rigid body. In plain words, I want to be able to throw a rigid-body. The above action works great for adding Force, but I wan't to get the angular speed and vector to also add Torque.
And if there is some another way of doing that please let me know :)
Kuba
jeanfabre:
Hi,
You would get the delta quaternion between each frame. So each frame, you record the current rotation, and substract from the previous ( and straight after that, you set the previous rotation to the current one). Then you have your rotationnal speed.
I have a package to work with quaternions:
https://hutonggames.fogbugz.com/default.asp?W967
Bye,
Jean
Kubold:
I'll try that, thanks!
gregacuna:
Jean...can you tell me which of the Quaternion options in your package would allow me to calculate the Delta and then the speed of rotation?
gregacuna:
I think I figured it out just using the Get Rotation and then comparing to calculate speed. It was my first big FSM, but seems to be working fine.
Still curious to know whether there is something in that Quaternion package which would make it easier.
Navigation
[0] Message Index
[#] Next page
Go to full version