Player start hard coded but keeps moving

Our level plays like a rail shooter passing through a series of tunnels. I noticed that sometimes when I would play test the player character would be far left or right of where it is supposed to be.

How it looks in my scene:

This would not always happen though, maybe 10% of the time? Here it is in place:

This is what it would look like when it’s out of place:

Funny thing is, when it was in the wrong place, it was not always the same place see here:

So I hardcoded the character start OnBeginPlay to be where it should be, but I still am seeing the player occasionally spawn in the wrong location.

BluePrint here:

I’ve come to my witts end because I am no longer changing anything in the blueprints.I go from one play session where the character is correct, then hit stop and immediately play again, and it’s off center. I even check the tunnel pieces to make sure they aren’t actually moving. The debug always prints the same locations of 0,0,0 and 0,+50,0…
Which also doesn’t make sense because I am positioning the player 50 units BEHIND the tunnel piece at 0,0,0

Hi ProfQuest2,

So far I haven’t been able to reproduce the error that you are seeing. Would you be willing to send us your project? You can send it directly to me by Private Message over the Forums if you like.

I believe the issue you are seeing is caused by the character simulating physics and it’s being pushed to the side (for whatever reason, I’m not sure). Like I said in my PM earlier, if you set the start point to 0,0,0 it drops to the correct location each time.

As a true fix for this, I suggest redesigning how you are implementing your character. Instead of placing the character above the capsule component and moving the capsule along a blocking volume, try going into the CharacterMovement component and changing the ‘Default Land Movement Mode’ to flying.

Let me know if that will work for you.