How to follow a spline.
I'm currently developing a game that has elements similar to infinite runners or the 3D Sonic games. I have the track, the movement and items etc.
The game is fully functional and almost ready to ship, but I want to experiment with a new idea to make the levels feel more interesting. SO I played around with spline components so I can have the track warp and turn. I have achieved this with a construction script and setting the distance between spline points etc - but the real issues are as follows :
The character runs automatically down the X axis, which isn't always in line with the track.
The items that are generated also no longer follow the track.
What I'm trying to achieve :
I'd really appreciate help with this.
Yes the Spline is excellent for creating rails. You have a few options at your disposal. You can get the Location, Rotation, and Direction along the spline using either Time or Distance. What you end up having to do on your end to utilize this is creating a variable which can hold your distance or time. Next you increment this value up in order to progress on the spline. The results are outputted by these nodes. You can also get tangents for more direction information.
Now to setup what you want with these tools you must create
This was all made very loosely and should be taken as-is. I believe this should work. I've done it a few times, so I feel safe saying this should work. If you would like me to help you with your setup directly I can do that.
Follow this question
Once you sign in you will be able to subscribe for any updates here