playMaker

Author Topic: Consistent Rotational float variable?  (Read 686 times)

curb47

  • Sr. Member
  • ****
  • Posts: 256
Consistent Rotational float variable?
« on: July 08, 2020, 01:34:16 AM »
Hello again,

I have a problem... another one...

I am using the Y-axis Rotation of my character to drive a specific camera move. Thanks to Jean I have got the rig set up nicely.
When the character is facing right, the Y is 90, and when it turns to go left Y-axis goes to -90, and vice versa, so I get a nice usable float going from +90, through Zero, to -90.

At a certain height/altitude my character flips to another state of play, with a slightly different control mechanic. At this point the camera still works fine.

The problem:

When my character descends back down to the first state of play, the Y-axis now goes from +90, down to Zero, and back up to +270. On the character control side of things, this makes no difference, it still plays fine, however it breaks the rig I've set up for the camera as the returned values are whacked.

Is there a way to get a fail-safe Rotational float value, so no matter what, I get a consistent float based on the Y-axis rotation, regardless if it's 90 to -90 or 90 to 270?

Or perhaps a float based on the direction the X-axis is pointing (left/right)?

Any help is greatly appreciated.

Thanks.