How to lock the player's X axes when on componet begen overlap is active

Hi I’m making a game where you play as a cube moving through the level avoiding obstacles, the player always move forwards. I would like for the player to stop moving the BP examples are attach to the question

Hi,

Question is a bit hard to understand for me. What do you mean by “Stop moving”? Do it immediately or slowly? You can disable control if you like and add some linear damping to slowly stop your player.

To answer question from the title, you can aways use StaticMesh->SetConstraintMode node in the blueprint to lock rotation. Rotation can also be locked if you click on mesh, then on the properties on the right select Physics->Constraints.

And, In order to stop player from moving immediately, you can use GetMovementComponent->StopMovementImmediately

Both are shown in attached image.