# Rotation questions

Discussion and feedback on Construct 2

### » Sun Jan 08, 2012 8:09 pm

hey guys
i have alot of questions about rotation and sprite movements

1-How to make the layer rotate slowly like a sprite move
2-how can i make a sprite move but slow down its speed gradually ( only with event sheet)
3-How can i make all objects stop when the sprite is rotating

Thank you
B
44
S
18
G
17
Posts: 2,249
Reputation: 17,585

### » Sun Jan 08, 2012 9:07 pm

1 - anglelerp
2 - lerp
3 - global variable

1 - You would have to set your layer angle using a to be add system expression anglelerp.
There is a way to do it in 3 events according to Yann, but I don't know it. Maybe some maths savy guy can come by here and enlighten us, I'd like to know that too.

2 - Lerp is another system expression.
It actualy already exists in C2 and you can check about it in the manual.
Pretty much the same logic as above, set the sprite X and Y to lerp(current sprite's position, destination's position, 0.5) (the 0.5 helps to smooth the thing)

3 - A variable that indicates that you want your object to move or to stop.
Set it to 0 and be sure to check that it is 0 in the event were you move your sprite.
When you want the objects to stop, set the variable to 1. When you want to move them again put them to 0.Kyatric2012-01-08 23:06:33
New to Construct ? Where to start

Please attach a capx to any help request or bug report !
Moderator
B
311
S
128
G
101
Posts: 7,416
Reputation: 75,228

### » Sun Jan 08, 2012 9:56 pm

@Kyatric
2-
I mean like move at a speed of 50 and decrease it speed till' it get to speed 1 ( this mean that it reached it destination )
B
44
S
18
G
17
Posts: 2,249
Reputation: 17,585

### » Sun Jan 08, 2012 11:06 pm

The answer is still Lerp (be sure to click it's another topic explaining the usage of Lerp)
New to Construct ? Where to start

Please attach a capx to any help request or bug report !
Moderator
B
311
S
128
G
101
Posts: 7,416
Reputation: 75,228

### » Mon Jan 09, 2012 10:03 pm

thank you @Kyatric
B
44
S
18
G
17
Posts: 2,249
Reputation: 17,585