playMaker

Author Topic: Complete 360 degree Object Rotation  (Read 1063 times)

TechHead

  • Playmaker Newbie
  • *
  • Posts: 3
Complete 360 degree Object Rotation
« on: February 06, 2020, 09:43:38 PM »
Hi all,

I know how to rotate an object indefinitely, though is there a straight-forward way to rotate a Game Object a whole 360 degrees, or even better, specify how many complete rotations for it to do?

I have been looking at YouTube videos and forum articles, though all the relevant rotation articles are for rotating the game object indefinitely.

A lot of people seem to use iTween in the older videos and posts, though from what I've read more recently, iTween is outdated, is this correct?

Thanks in advance,


Simon
« Last Edit: February 06, 2020, 09:45:35 PM by TechHead »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Complete 360 degree Object Rotation
« Reply #1 on: February 07, 2020, 01:49:11 AM »
Hi,

well, for this, I would iterate the rotation manually, and then you can compare the current float to your max rotation target.

I would use floatAdd action, store that as the angle, then use SetRotation to tell the object how much it has to be rotated, and then use FloatCompare on the angle I got from floatAdd and compare it to my maximum rotation I want.


the above is applicable for many many situations,  it's often very important to control the data instead of incrementing a value that you don't control in the end.

Bye,

 Jean