How do I STOP a rotating sprite

Get help using Construct 2

Post » Mon Feb 16, 2015 3:34 pm

Hello,
in my app i have a circle sprite with the behaviour "Rotate" at the start of layout the object is rotating at the speed of 180 and acceleration 10 with this formula: Sprite.Rotate.Speed+Sprite.Rotate.Acceleration
I would like to slow down the rotation from the actual speed of the object to zero when i push the "espace" key.
at Zero the object "stop".
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Mon Feb 16, 2015 5:19 pm

somene know a solution to this?
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Mon Feb 16, 2015 7:09 pm

You can do it like this:

Image

Btw the "per second per second" is not something fancy, just think its a typo in C2 :)
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Mon Feb 16, 2015 7:57 pm

thanks a lot :D FINALLY SOLVED :D
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Mon Feb 16, 2015 9:22 pm

Just for alternatives, there is a third party behaviour 'RotateTo' that has deceleration. Or you could use LiteTween, lerp, anglelerp. BTW it's not a typo, acceleration is the rate you're increasing in speed over time, so here you're increasing rotation speed at a rate of -25 pixels per second, every second.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: apalm1341, blissfulwizard, Malhog and 16 guests