How can I dynamically constrain a player's movement to an axis?

From my very surface level understanding, it seems like Set Plane Constraint should limit the player’s movement to a particular axis when activated. I’m trying to get the player to push a block, and when pushing this block, the movement of the player is slowed and becomes constrained to the axis the camera is facing, so it won’t slide against the block.

This is currently what I have to try and determine which axis to use.


The branch there correctly determines which direction the camera is facing, but the player can still move in the other axis and therefore slides against the block.
Any help would be appreciated, thank you!

Have you enabled Constrain to Plane?
image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.