Hi there, I have making a River that follows a spline But I need my player to swim In it, But Placing box collisions manually In the editor Is super tedious and especially for a large map, So I figured if I somehow attached a box collision onto my spline I could use overlap event from there but I can only put static meshes on the spline, Any help with this would be extremely helpful, thank you.
You can use a Spline Mesh Component, it will deform and follow the curvature of the spline. You get to control trasforms at every point manually, too.
This does not look right. Ensure the mesh you’re deforming has complex enough geometry. A plain box will not give you great result.
If in doubt, post scritp.
Post script, no one can guess what’s up. But, the standard approach would be:
- run
Construction Script - iterate over spline points
- add Spline Mesh Components - you do not need overly complex meshes, consider performance. A low-poly cylinder with 4-5 rings should be fine. Or a box with a some subdivision.
- apply spline location and tangents to the SMCs
- set
Start ScaleandEnd Scaleof the SMCs - at no point should you be scaling the actual mesh yourself. No clue how the rest of your script looks like, but this part could be close to:
- adjust each
Spline Componentpoint’s scale in viewport - when it comes to handling collision, I’d start with this:
ObjectType should be a custom River type.
yes sorry, I was setting only x, y scale Not Z that explains why it was deforming weirdly And the lack of geometry on my cube was another reason. Thank you for all the help I greatly appreciated it!





