I wanted to implement a visual feature in the top-down view where your navigation path would be shown with a spline. With a lot of help I managed to put together this setup: Spline Path posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4
It kinda works with one problem, the path remains both as the character walks along it and when the character arrives at its end. When holding the mouse button this is not an issue, since the tick makes it draw anew every tick so the spline is updated, but obviously as soon as you let go, it acts as if was a single click. I was suggested multiple solutions:
- I could delete singular meshes as I walk through them (no idea on how you could check that) but this would lead to some ugly chunks if you were to have long, straight meshes as they would remain until you pass their successive spline point
- continously shorten the first mesh by updating its starting point (i think that would be the player actors location) until the player passes it, then iterating through following spline meshes (again, no idea on how this could be implemented)
- just completely go through the sequence again of deleting the old path and drawing the path again, until the player has reached its destination (either through checking position of actor and destination / checking whether velocity of player is 0)
out of these 3) is the only one I tried, as I do not know how 1) and 2) could be implemented, but I couldn’t manage to get a recursive function going without entering an endless loop within the tick function. I would appreciate suggestions or ideas on how to implement this, as I have unfortunately not found comparable solutions. It’s a very nice looking, subtle feature and doesn’t seem complex at first glance. Thanks in advance.