playMaker

Author Topic: Typical rotation problem, 180 to 360  (Read 1231 times)

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Typical rotation problem, 180 to 360
« on: October 23, 2015, 09:32:45 AM »
Hellow!

I have a rotation in 180 to -180 format, and I want to convert it into typical 360 format understandable for the 99.99% of population that don't know what a f** quaternion is :D

I know it is not that difficult but i I have spent too much on this and I want to move to another problem :)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Typical rotation problem, 180 to 360
« Reply #1 on: October 23, 2015, 11:12:48 AM »
I know how u feel so....

http://hutonggames.com/playmakerforum/index.php?topic=4457.0

Hope it helps  :o

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Re: Typical rotation problem, 180 to 360
« Reply #2 on: October 23, 2015, 02:10:16 PM »
Thanks!

Yes, I saw this actions before...it is just I don't know what action/s I need UU'

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Typical rotation problem, 180 to 360
« Reply #3 on: October 23, 2015, 02:20:01 PM »
Unity displays vector3 rotations kind of as it sees fit. I don't think there is a way to force it to always display positive numbers. like '90' instead of '-270'.

Quaternion actions probably arent what you want to do that.

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Re: Typical rotation problem, 180 to 360
« Reply #4 on: October 24, 2015, 02:55:16 AM »
Well, I made it, but I don't know even how lol.

Just stored the euler angle in 180 to -180 format as quaternion (using Y axis) and then used the action "quaternion inverse".

Now the character faces direction of movement when the faint animation is triggered ^^

Thanks everyone.