playMaker

Author Topic: [SOLVED] Rotate, but not 360. Flip flop  (Read 3192 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
[SOLVED] Rotate, but not 360. Flip flop
« 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.
« Last Edit: December 11, 2014, 08:52:33 AM by Lane »

Merto

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Rotate, but not 360. Flip flop
« Reply #1 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:



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.



« Last Edit: December 10, 2014, 09:23:52 AM by Merto »

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Rotate, but not 360. Flip flop
« Reply #2 on: December 10, 2014, 10:58:54 PM »
Thanks..  That worked. 

BTW:  adding a rotate ping pong action would be nice too.

clandestine

  • Sr. Member
  • ****
  • Posts: 255
    • ЯKD.ZONE
Re: Rotate, but not 360. Flip flop
« Reply #3 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).

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: [SOLVED] Rotate, but not 360. Flip flop
« Reply #4 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.

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Re: [SOLVED] Rotate, but not 360. Flip flop
« Reply #5 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.