Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Kevron on December 09, 2012, 07:36:38 PM

Title: Figuring out a 360 rotation
Post by: Kevron on December 09, 2012, 07:36:38 PM
Hi, I have spent some time trying to figure out how to know when my Gameobject rotate 360 degrees or more, either positive or the negative direction.

In my case it is a Biker, and I am playing around with a score system based on the bikers "tricks"

I have tested the action "Get Euler Delta angle", and it seems to give me some values about the rotation.

I also followed this thread: http://hutonggames.com/playmakerforum/index.php?topic=1412.msg11915#msg11915

What I have done:

I check if the biker is "inAir" or "onGround"
If "inAir", a gameobject (targetSphere) inherits Bikers position and rotation
I use then "get euler delta angle", where game object is Biker and Target is Target Sphere.
This gives me Angle, Signed angle, Result positive angle and Result negative angle.

Then I am lost.. Is it the right direction? I get some rotation values that does not make much sense to me.
The axis I would like the rotation value for is the X-axis.

I hope somebody could feed this to me in lamers terms.

Best regards,
Tor M
Title: Re: Figuring out a 360 rotation
Post by: jeanfabre on December 11, 2012, 05:30:56 AM
Hi,

 you are on the right path, you need then to add this signed value each frame to a "total" variable, and check that it gets below or above 360. I think this is what you are missing currently.

bye,

 Jean