So, basically, I’m trying to get the camera and player to work correctly. The game starts out as a normal looking 2D game. but when you press the ‘R’ key, the camera rotates, which gives you a different view of the ground platform. The player is supposed to always be facing the camera, since it’s rotation is always set to the camera’s rotation. The problem is that it only faces the camera when the ‘R’ key is being pressed. When the key is not being pressed it either reverts back to it’s original rotation, or it stays in the rotation changed by the camera until you move. That’s also another problem. The player is supposed to go left and right when the ‘LEFT’ and ‘RIGHT’ arrow keys are pressed. It works, but when theplayer rotates, it still goes in the default right and left direction, meaning it goes back to facing the front (the rotation is set to 0, 0, 0). So I need a way to make sure that when you move right, it’s the right relative to the camera’s rotation, not the player’s position. I know this is kinda long, and might be hard to understand, but how do I implement these concepts?
Link To Editor: https://playcanvas.com/editor/scene/873305
Link To Script: https://playcanvas.com/editor/code/665056?tabs=27813999