Creating a spline after the movement of a character

Hello everyone!
I have a small problem and I would like to have some advices for you guys!

I know unreal quite well but splines is always a struggle.
Here’s my problem:

I have a character that works like a “plane”, i want that after him he could create a mesh that have a collision behind him (like in tron). So in multiplayer people will collide on other’s “trail”.
Also I want that when a character collide with something, it will go “back” a little bit on the path he did (a little bit similiar to the recall of Tracer)

So to sum up: A character that create a long mesh everywhere he goes, and when colliding into something he go back a little bit on the path he did, “erasing” the mesh, and then he starts to go forward again.

My problem is that i don’t know what i should do. Is using a spline mesh that will create points is a good idea? Is it possible to “add” points for a spline during runtime?

I’ll be honest i’m a little lost on this one, so if you know any thing it would be great!

Have a good day

So quick and dirty, You would have a seperate actor that the player character has a reference to, that actor would have the spline. Then you would have a bit of code ona timer in the player to add points to that actor


Like so

On the Spline blueprint this is what you are calling there

This would leave the spline points behind the player. there are plenty fo tuts for adding things along a spline so you can find that no problem.



This bit is slightly more complicated, but what you have to do is iterate through the spline points to find the closest one and then set the actor location. Hopefully these pictures can help but they are little more then psuedeo code

Thank you for the quick response, i’ll try it and let you know if everything works!

so after few testing, the spline seems to work fine, every 2 sec i create a point were the location of the player is, so it’s perfect and thank you so much for your explanations!
Unfortunatly when i try to add a mesh from the last spline input key and the previous spline input key, the location of the mesh is always off, and with relative or world location it’s not changing anything