playMaker

Author Topic: Get Rotation  (Read 162 times)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 109
    • View Profile
Get Rotation
« on: November 21, 2018, 09:38:17 PM »
I'm trying to do something simple: Getting Rotation.x from one object and setting that Rotation to another object.

My problem is the 'Get Rotation' seem to only get a 0-90-90-0 and 360-270-360 range. Meaning when my object is rotated 91(in the inspector), the value of the 'Get Rotation' shows 89 instead of 91.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14052
  • Official Playmaker Support
    • View Profile
Re: Get Rotation
« Reply #1 on: November 21, 2018, 11:20:29 PM »
Hi,

 yes, this is by design for euler angles, you should have both your object within the same reference, so that 89 degrees becomes the same rotation for both the source and the target.

else, you could use the signed angle  or 360 angle actions from the ecosystem, which will give you either a -180 180 range or a 0 360 range.



Bye,

 Jean