You could search for the spline and put the player on it ( get actor of class ).
Or you could make the spline part of the player.
And many other ways, its really up to you, and what your goals are.
You could search for the spline and put the player on it ( get actor of class ).
Or you could make the spline part of the player.
And many other ways, its really up to you, and what your goals are.
Looking at your pics, your player and spline are separate actors, and you have a reference to the spline in your player?
But the first code you showed looked like the spline was pulling the player along.
If the player is controlling things, they will need to control the distance along the spline and to do that, they will need a reference to the spline.
If the spline is pulling the player along, then its the other way around. The spline will need to have a reference to the player.
I’m wondering if you’re getting ‘none’ errors when you stop play, which would indicate a reference is not set correctly.
Also, if you’re spawning your pawn from the gamemode, the one you have place in the level is redundant. The spawn can easily take place a few frames after begin play in the spline, if you’re using that. So it the spline is looking for the player, you could try a delay before doing that.