Generating Random Path

How to generate random paths? My enemies all go the same path after a while and it’s not very appealing

2 Likes

This is how I do it - the distances are set in world units, but need to be multiplied by 1000.

			RandomPath path = RandomPath.Construct(transform.position, (int)(roamingDistance * 1000f));
			path.spread = (int)(roamingDistanceSpread * 1000f);
			_seeker.StartPath(path, null);
1 Like

Thanks, I’ll try it now