Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wheretheidivides on December 09, 2014, 08:16:36 PM

Title: [SOLVED] Rotate, but not 360. Flip flop
Post by: wheretheidivides on December 09, 2014, 08:16:36 PM
So I am rotating something 360 degrees but it looks dumb because it's text.  I want it to go to about 100 degrees and reverse to -100 degrees and reverse.  So it does not always goes in 360 in the same rotation, but gets to a set degrees and reverses itself.  This seems like a common thing so must be easy.  The alternative is to set up a series of checks somewhere.

I'd suggest a addition to the rotate to allow a reverse at a set degrees.  If you have 2 of them included, then you could do this.
Title: Re: Rotate, but not 360. Flip flop
Post by: Merto on December 10, 2014, 09:20:43 AM
If you want an object that rotates a set amount of degrees, then reverses and loops between those two infinitely, here's a thing I made that should do it:

(http://i.imgur.com/g8Vt7Jr.png)

The reverse state is exactly the same as the rotate state, it just has -100 in the YAngle section. If you want it to rotate a certain amount of degrees faster per second, change the amount of degrees to rotate and if you want it to rotate a certain amount of degrees slower per let's say a few seconds, just change the amount of delay between the Send Event actions.



Title: Re: Rotate, but not 360. Flip flop
Post by: wheretheidivides on December 10, 2014, 10:58:54 PM
Thanks..  That worked. 

BTW:  adding a rotate ping pong action would be nice too.
Title: Re: Rotate, but not 360. Flip flop
Post by: clandestine on December 11, 2014, 04:54:58 AM
You can do that with LeanTween which is free, but the PM actions cost a small amount in the asset store (made by someone outside the PlayMaker team).
Title: Re: [SOLVED] Rotate, but not 360. Flip flop
Post by: wheretheidivides on December 11, 2014, 01:18:28 PM
I see that.  but $15 to rotate something seems a bit much.  I did it though scripting but will keep this in mind.  Thanks for letting me know it exists.
Title: Re: [SOLVED] Rotate, but not 360. Flip flop
Post by: 600 on December 11, 2014, 01:28:28 PM
Hi, maybe this helps:

- Float interpolate
- Set rotation
- Float compare (to check when finished)

All in Every Frame.