How To Implement Specific Player Movement

Now, I know how to get the player moving, but I want it to move in the direction left and right relative to the camera, not the player’s position itself. Meaning, if the camera was facing the camera, and the camera was rotated and moved to the other side of a platform, the player would move left and right of the camera, not left or right of the player itself. Basically, I want the player to go right and left based on what direction the camera is facing. Can someone figure out a way to get movement like this?

Link To Editor: https://playcanvas.com/editor/scene/873305

Hi @GmeMkr,

Here is a good example on how to move an object based on the direction of the camera:

https://developer.playcanvas.com/en/tutorials/first-person-movement/

You can rotate the camera to freely look around and when you start to move a force is applied to the invisible capsule/entity, which represents the player, towards the forward direction of the camera (camera look direction).

Ok, I’ll check it out later.