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.
Develop games in your browser. Powerful, performant & highly capable.
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).
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.
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
korbaach Perfect !! I love you guy haha thank you
Thanks also for the assistance granpa