I’m wanting to create a Spline system for my 2D/3D hyrbid platformer, and want to make splines the player can get close too and be stuck on so they can follow bendy roads in 2.5D or certain paths in 3D, however, all tutorials on Splines just set the entire game on a spline, I want a Spline actor that’s something I can place separately in the Level for certain moments but there’s not a lot of good documentation on this. Any pointers on where to get started or is there documentation for this somewhere?
In short, you want the player to be able to detect a nearby spline, right?
While the Splines themselves have no collision capacity of their own, Spline Mesh Components can be overlapped with. The player can hit E, perform a sphere overlap and fetch a nearby SMC which can reference the underlying spline used to shape the mesh.
Wouldn’t these already be made with spline mesh components? What’s your vision for achieving the visual? Particles?
Normally one creates a spline which does not have any rendering capability and then deforms a series of spline mesh componets that follow the spline’s curvature. Usually 1 smc per spline segement. Those segments can be collided with.
Roads, rails tracks, vines, trees, hanging cables, projectile trajectories, all (?) games where the skateboard player grinds an edge / surface.
not a visual. I’m just looking to make splines that the player follows if touching them akin to the Modern Sonic games which blend levels with freedom of movement and also spline tracks at set points for automated bits
Got it, no visual, just a path. Since splines have no collision, we cannot detect them with overlaps or traces. Technically, you could fetch them with Get Actor nodes and a Tag but that will require sorting by distance - if you have a lot of splines in the level, it may become tedious / awkward.
I’d still go with my original suggestion, a very simple spline mesh we do not render, only there to facilitate overlaps and procure a spline reference. Does this look like something you could work with:
Whenever we get close to the spline, we get its reference and the closest world location so we can hop on it and start following it along. The detection radius can be adjusted.