playMaker

Author Topic: RotateAround Stop Angle  (Read 677 times)

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
RotateAround Stop Angle
« on: August 01, 2020, 02:59:26 PM »
Hello

In my first state Im using GetAxis:
Axis Name: Horizontal
Multiplier: 1
Store: xMove

The next action Im using rotateAround:
Rotation Axis: x:1
Angle: xMove

This lets me rotate the object using the arrow keys (or WSAD), I need to limit the rotation so that the object does Not go in a 360, so I set the Stop Angle to 30.

The issue Im having is once it reaches 30 I can no longer rotate it back the other way (it seems to get stuck at 30), is there anything I can do so that once it reaches 30 I would be able to rotate back the other way?

I also noticed one last issue there is no limit in the negative direct, what can I do to limit the negative and positive rotation for this object?

Greatly appreciate any advice, as usual you guys are fantastic!
« Last Edit: August 01, 2020, 06:23:28 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: RotateAround Stop Angle
« Reply #1 on: August 01, 2020, 07:14:59 PM »
Alrighty =)

I tried using 2 float compares with no luck.
Then I stumbled upon a Conditional Expression action that works to jump to another state when the xLimit is reached (now I just need to figure out how to subtract one number and send it back without getting a loop count exception). The expression I used is:

xLimit <= 15 || xLimit >= 345 (as the rotation is calculated around a sphere 0 to 359 :))

I'm now thinking maybe its best to breakup the Get axis Horizontal movement to calculate the negative value and the positive value of xMove separately?
« Last Edit: August 01, 2020, 07:26:59 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool