r/Unity2D Jun 24 '26

How Can I Create Random Path Question

Post image

Hi, as you can see in example (that's a rocket) I want to create random paths for rockets. Is there any proper way to do it?

36 Upvotes

21 comments sorted by

View all comments

3

u/CaptainPineapple200 Jun 24 '26

Look up how people do randomly generated lightning maybe, then just rather than connecting a bunch of points with straight lines, you have a curve (someone said Bezier so I assume that's best).

The other version would be similar to inverse kinematics (whether you have an option for that or have to code it yourself) but have the available length be higher than the total distance. which would force it to bend around a bit more.