spiral path generation in unity

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 …

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?

actually 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

ok 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 .....

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

hello my friend sparkzbarca can u tell me the code whatever u explain right now . problem is that i am new in unity . and i am not able to write the code for it . so please help me out .thanks in advance...

this isn't about being new to unity this is about knowing how to code. Do you know a programming language? you can rotate around with transform.RotateAround(point,axis,angle) you can slerp with vector3.slerp(start,end,time.deltatime) i can write it it's not that hard but if you cant program there isnt much point. You cant program a game if you cant program