Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: Kubold on December 10, 2013, 09:26:09 AM
-
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
-
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
-
I'll try that, thanks!
-
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?
-
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.
-
Hi,
yes, you only need to compare two rotations against time to know the speed.
Bye,
Jean
-
hello plz with What do you compare the rotation with the get rotation Node ? do know a step by step tutorial ? thanks for any help i am designer not a programmer ^
-
Hi,
@utopien you can better post a new question as it differs from this topic.
Can you give some more information of what you are trying to do.
I did a quick search on get rotation node but i did not find much.
-
@djaydino hello and thanks i am trying to get my character controller speed rotation as a float so i can use it the animator by set animator float
and sorry but i thougnt that was topic i will repost if nessesary sorry for my english i am french
-
Hi,
There is an action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) called "Angular Velocity" maybe that one can help.