playMaker

Author Topic: Rotation interruption and return back to original rotation  (Read 1312 times)

jhoffman

  • Playmaker Newbie
  • *
  • Posts: 2
Rotation interruption and return back to original rotation
« on: August 19, 2016, 12:46:51 PM »
Hello all,
Having a little issue with Playmaker that im hoping someone here can help me with. Im more experienced with coding but wanted to learn Playmaker to handle some of the things that will be happening in my game. Currently i have a sphere that will start at 0,0,0. On an input, for example s, the object will rotate 180 degrees to the right on y axis. This i have built and works with no problems. Where Im having issues is I want a different input (a) to rotate the object back to its starting point of 0,0,0 no matter where the rotation to 0,180,0 is at. Now ive come up with a few different approaches to this and none of come out working well. What would you all suggest as an approach to this? Thanks in advance

kavery

  • Full Member
  • ***
  • Posts: 149
Re: Rotation interruption and return back to original rotation
« Reply #1 on: August 24, 2016, 01:16:34 PM »
What I usually do for stuff like this is have a state where the object does a 'rotate to' action - for going back to 0,0,0. Pressing 'a' here would go to that state. Any previous state could have any type of rotate action, maybe a 'rotate from', 'rotate by' or just a plain 'rotate'. Using 'rotate to' for both actions is often very reliable.