playMaker

Author Topic: Get Object Rotations Over 360  (Read 2209 times)

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Get Object Rotations Over 360
« on: February 18, 2017, 09:48:36 AM »
I am trying to get rotations (every frame) over 360. The inspector says over 360 (for example 450, not back to 90 degrees again). However, in playmaker, using the "get rotation" action or the "Get Property" from the object, it also goes from 360 back to 0 in rotation.

Since I am doing some simple math equations on the rotational Y angle, I need the inspector number. Any way to get this with playmaker?

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Get Object Rotations Over 360
« Reply #1 on: February 21, 2017, 07:36:19 AM »
I am going to bump this. Maybe there is no current playmaker actions to address this issue? Or maybe I am just overlooking a math issue that I am not aware of. Thank you.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Object Rotations Over 360
« Reply #2 on: February 23, 2017, 01:49:37 AM »
Hi,

 can you make a screenshot of where things are so I can picture it better, I am confused a bit :)

 Bye,

 Jean

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Get Object Rotations Over 360
« Reply #3 on: February 23, 2017, 04:08:30 AM »
No problem.

Playmaker says:
Action: Get Rotation (from game object)
Y Rotation = 40

Inspector Says:
Game Object
Actual Y Rotation = 400


The playmaker action get rotation goes from 0 - 360, and then starts again at 0 after passing 360.



I would like to perform some math equations on the actual rotation, so I need to the real actual number in playmaker (400, not 40).

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Object Rotations Over 360
« Reply #4 on: February 23, 2017, 05:44:08 AM »
Hi,

 I see. You need to keep track of this yourself, I guess you are incrementaly rotating the object right? keep a variable representing this total amount, since you are yin control of the incrementation logic, and then you'll have access to this "400"

The component inspector is only using this "400" within it's custom inspector, not within the final value of the transform rotation, which is expressed in a quaternion and therefore can never got out of range by itself.

Bye,

 Jean
Bye,

 Jean

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Get Object Rotations Over 360
« Reply #5 on: February 23, 2017, 07:57:23 AM »
Thanks Jean. Ill see what I can figure out.