i am doing one project in unity. and i want to make path which should be automatically generate in spiral view . first of all i will provide the initial point and also ending point and finally based these point it should be able to generate the path in 3D view.
please anyone help me as soon as possible
thanks in advance …
1 Answer
1
use rotateAround rotate around the center point
as you approach 1/2 pi radians
slerp from where you are to RotateAround result + (postion - point)
you rotate around a point while slowly increasing your distance from the object
the result will be a spiral pattern as long as you control for the speed at which you slerp
What do you mean by "path" and what is a "spiral view?" Are you talking about an array of Vector3s or are you talking about something on a terrain?
– robertbuactually i want to generate the path in 3D .it may be whatever terrain or Vector3s it's not matter. actually i am developing a car racing game . and in this game i want to generate the random path in 3d view . one thing more please tell me the answer with code . because i am beginner . thanks to all in advance
– kamleshDONok i got this . mean i will go step by step . but i have one more problem . problem is that i want to draw a spiral equation in 2d view . how can i draw this spiral. please help me out as soon as possible . thanks a lot in advance .....
– kamleshDON