how to make a spiral that goes through a specific point

93 views Asked by At

I am in unity and trying to make an object have a spiral shaped trajectory that goes through a point. the movement I am trying to make is in 2D.

Here is where I make the spiral shape:

enter image description here

and I want to know the necessary var_length , radian, length and var_radian necessary to go through a specific point.

I was wondering if anyone here already had to make that kind of movement.

I tried to use the radian that if you follow from the starting point of the spiral you get to the target in a straight line, the radian that the projectile has in the beginning, calculate the distance between the 2 points to figure out the number of time I need to change the radian and length.

what I tried did not handle the movement of the target point very well.

The way my code is made makes it that var_len and radian (at the start), you know their values.

0

There are 0 answers