So I have a 3rd person camera that works fine, and a character controller. The character controller works fine as far as moving me, but it doesn’t rotate my player with the camera (The camera is a child of the player). Basically what I want is if I rotate the camera, the player rotates with it so its back is always facing the camera. I’ve been tearing my hair out over the problem over the past 4 days, and I got so desperate that I even ventured to the second page of google, yet nothing worked, either doing nothing or rotating the player on all axes (I only want Y rotation). If anyone could try to help, that would be great.
Thanks!
If your camera script isn’t in your character controller maybe try to make it so you have one script that controls both your player and your camera.
I’m pretty sure this should work if it doesn’t I’m sorry.
`
I don’t know why my previous answer didn’t make it through, but here I go again.
The usual setup here will be making your script control the character movement. Then setting the Camera as a character’s child will make it turn with the player as childs inherit all parent’s Transform changes. Making the script control the child will not affect the parent.
[There’s a short tutorial on Unity Learn][1] about creating a 3rd person camera that tracks your player that I think you might find usefull.
Happy coding.
[1]: Controlling Unity Camera Behavior - Unity Learn