In my game, I have a movement system where the direction the WASD keys move the player is dependent on the camera. In other words, I have the W always move the player upwards, A always to the left, and so on, no matter where the camera is. This works great, but I need to find out how I can make the player face the direction they are moving.
transform.rotation = Quaternion.LookRotation(rotation);
does not work because it just points the player directly along the X or Z coordinate, and not the actual direction of movement. If there is a way to rotate along the exact direction of movement, then that solves my problem. But if not, the way I figured I’d solve this was if I used a dummy object to always have the same y rotation as the camera, and rotate the player relative to that object. (the direction the object is facing is always 0, and the player rotates relative to that). I was just wondering if this was possible, OR if there was a way to rotate in the exact direction of movement.