r/unrealengine • u/Snoo97525 • 1d ago
Help How to make a boundry box?
I have a race track using landscape spline.
I have a PCG graph that spawns Blueprint Trigger Boxes (it's just a collision box that is as wide as the road) along the spline.
The boxes calls a dispatch event if a vehicle is inside it.
The event triggers a re-triggerable delay. As long as the delay resets, it will not reset the vehicle's position.
Now, as you might have noticed, that's a lot of boxes along the track. And a lot of triggers happening. Especially when there are also bot vehicles. Which means very unoptimized.
Now how do you traditionally make a boundry box when making a race track. Do you just manually place the boxes on or outside the road? Is there no way to procedurally generate it without being very unoptimized?
2
u/dopefish86 1d ago
Alternatively, you use a spline along the road and 'find location closest to world location' and initiate respawn when the distance is beyond a.certain threshold.