Ellipse Animation by code

Hello, I really need help, I am trying to make this 3D animation by code,

, I have tried to transform, translate, vectors3, quaternion and I am really lost, this is what I have know but I do not know how to make the red line follow the green ball without moving from the blue point. I will be very grateful for your help.
What i want

what i have:

Hi, sorry i don’t have time to provide code but i would do the following:

Write code to move a single point around an circle i think you may have done this already from your video. You can do this using sin and cosine functions with the angle on the circle. An ellipse is a circle where one axis is scaled, for example multiply y by 0.5

For each frame, draw the complete ellipse and a line between the moving point on the ellipse and two fixed points on the sides.

For the red blue line below, this is essentially the same except the ellipse has been scaled to have zero y

Good luck!

1 Like

If i understand correctly, you could use a line renderer, and set the position of the second point of the line as the same point as the ball.

It worked!!! Thank you. With Line Renderer I put the green ball as the destination of the line renderer and it worked correctly. :slight_smile:
https://www.youtube.com/watch?v=is_93FB3wsA
You are great, thanks.

Thanks for your suggestion, it works with lineRenderer, Have a nice day :slight_smile:

1 Like