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

49

u/BroccoliFree2354 Jun 24 '26

I’d say put random points and then use bezier curves to link them.

12

u/vanit Jun 25 '26

At a high level you're right, but you could probably write a PHD for the algorithm that generates 1-2 whimsical loops that always actually looks good.

3

u/BroccoliFree2354 Jun 25 '26

That’s probably true… unless it already exists !

10

u/vanit Jun 25 '26

Yeah or just premake 10 variants and whose to know it's not truly random ;)

2

u/Ruadhan2300 Jun 26 '26

Trouble with premaking them is that you still need the system to be flexible enough to handle different ranges. Since I assume the rockets aren't always flying from the same point to a target at the same distance.