Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Kubold on December 10, 2013, 09:26:09 AM

Title: Get GameObject Rotation Speed and Rotation Vector (no physics)[SOLVED]
Post 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
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: jeanfabre on December 11, 2013, 02:58:01 PM
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
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: Kubold on December 11, 2013, 05:10:38 PM
I'll try that, thanks!
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: gregacuna on November 22, 2016, 10:34:06 PM
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?
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: gregacuna on November 23, 2016, 03:53:35 AM
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.
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: jeanfabre on November 24, 2016, 01:38:51 AM
Hi,

 yes, you only need to compare two rotations against time to know the speed.

 Bye,

 Jean
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: utopien on November 18, 2017, 08:17:36 AM
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 ^     
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: djaydino on November 18, 2017, 10:20:39 AM
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.
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: utopien on November 18, 2017, 11:47:02 AM
@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
Title: Re: Get GameObject Rotation Speed and Rotation Vector (no physics)
Post by: djaydino on November 18, 2017, 12:23:35 PM
Hi,
There is an action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) called "Angular Velocity" maybe that one can help.