# [Solved] How to rotate an object?

Get help using Construct 2

### » Tue Sep 29, 2015 2:47 pm

Like the image below, I have this big white circle and I want that black stroke rotate around the circle every time I click the mouse.

But I want the dash go exactly where the mouse was clicked, rotating the circle.

Last edited by pauloanry on Tue Sep 29, 2015 4:47 pm, edited 1 time in total.
B
10
S
1
Posts: 11
Reputation: 631

### » Tue Sep 29, 2015 2:59 pm

Rotate toward position
Rotate the object a number of degrees toward a position. If the object is close to facing the target angle it will not overshoot (it will end up exactly at the target angle).
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

### » Tue Sep 29, 2015 4:33 pm

Manual:System expressions wrote:anglelerp(a, b, x) Linearly interpolate the angle a to b by x. Unlike the standard lerp, this takes in to account the cyclical nature of angles.

anglerotate(start, end, step) Rotate angle start towards end by the angle step, all in degrees. If start is less than step degrees away from end, it returns end.

anglerotate.capx

Last edited by korbaach on Tue Sep 29, 2015 6:06 pm, edited 1 time in total.
B
67
S
24
G
7
Posts: 1,519
Reputation: 11,104

### » Tue Sep 29, 2015 4:45 pm

@korbaach Perfect !! I love you guy haha thank you

Thanks also for the assistance @granpa
B
10
S
1
Posts: 11
Reputation: 631