How do I Set maximum rotation speed

0 favourites
  • 3 posts
From the Asset Store
The collection includes pre-categorized selections that can be the definitive tone setting backdrop to gameplay.
  • Hello, i am using rotate behaviour. Speed set to 0 and acceleration set to -5. I would like to set maximum speed of the rotation. Because it accelerates to infinity. How can i do this?

  • You will need to access its controls via an event and change them when you want this to happen.

    When you do an action on the object with the rotate behavior assigned you get the options to "set speed" and "set acceleration" allowing you to change these.

    You will need to decide when you want to stop it accelerating and set it to 0 at that point.

    If its a time thing then use a system event that deals with time and then action out to changing the speed/acceleration.

    If its a click, collision, or overlapping event then action out of it via the object.

    You could always not set its speed and rotation in its initial properties and instead set them via the actions I mention above at On-creation event or On-Start-of-layout, etc.

    You could also grab its current speed/acceleration via the objects "expressions" (the window that pops up with low opacity behind your action window when your making an action) using Sprite.Rotate.Acceleration or speed. You would need to have an event that stored this into an instance variable and then compares it to what you want the max to be and then stops it when it is equal/greater.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you, will try and let know what was the best solution

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)