- Home /
How to generate the points on a circle edge in a order according to angle.
Hi. I am trying to move a ball in a pipe surface. as the pipe surface is is a circle. i need to generate some points on the edge of this circle according to horizontal input. how to generate this ? i tried to use the formula given below bt could not implement correctly. vertical = radius Mathf.Sin(moveAngle Mathf.PI / 180); horizontal = radius Mathf.Cos(moveAngle Mathf.PI / 180);
how can i implement this or any better process to move the ball? Thank you
Answer by MichaI · Dec 23, 2019 at 10:01 PM
The formula specified by you is correct and should work, but I think that in your case it could be easier just to make a parent GameObject to your ball (or object you want to place on the pipe surface) that would be in the center of the pipe and just rotate that parent.