playMaker

Author Topic: Get Rotation  (Read 971 times)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Get Rotation
« on: November 21, 2018, 11: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: 15500
  • Official Playmaker Support
Re: Get Rotation
« Reply #1 on: November 22, 2018, 01:20:29 AM »
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