playMaker

Author Topic: speed of rotation: help  (Read 728 times)

simpson.p

  • Playmaker Newbie
  • *
  • Posts: 7
speed of rotation: help
« on: May 06, 2019, 06:55:38 PM »
Hello,

I have been struggling with this one.  I want to find out how fast a gameobject is rotating.

I have 2 states both with a next frame action.  Within the states I get the relative rotation speed by subtracting the current rotation from the previous frame's rotation using vector 3.

This does give me the current rotation value however, If I turn to fast the number maxes out and switches between 360 and -360 instantaneously which sort of defeats the purpose.  I do need a positive and negative value for the rotation as well.

Is this due to gimbal lock?  Or Is there an action somewhere that does this without that issue? Or does anyone know how to solve this?

I also experimented with Quats (multiply the previuos frames rotation by the inverse of the next frames rotation) but it stills seems to flip at max value.

Any help would be appreciated,

Thanks
« Last Edit: May 06, 2019, 09:10:51 PM by simpson.p »