I am developing a Third Person Shooter.
Until now, I had parented the camera to player. It would therefore automatically stay behind the player.
Because this would not work well with Root Motion, I need to use a different approach:
In my script, I need to make it so that the camera follows the player.
How could I make it so that the camera stays behind the player at always the same position (and with the same rotation)?
This is my current code, but it doesn't work:
_camera.transform.rotation = Quaternion.Euler(0, this.transform.rotation.eulerAngles.y, 0);
_camera.transform.position = _InitialCamPos + this.transform.position;
Can anybody help?
Thank you!