- Home /
Changing Character Controller Height, But Main Camera Doesn't Follow Properly?
I've got a bit of a problem. I'm using the old Unity FPS controller, and I've put a crouching script on it that changes the character controller's height when a key is held down, but I've run into a problem. The camera doesn't move with it properly. As far as I can tell, this is because the camera's position is relative to the center of the character controller. Essentially, I need the camera to move to the center of the character controller when the key is pressed, and back to its start position when it's released, but I'm a very inexperienced coder, and can't figure out how to do that. Could you help? I'd really appreciate it.
Answer by Arctic_Fletcher · Jul 05, 2020 at 09:26 AM
Actually, never mind. I managed to figure it out. Just had to use transform.local.
Your answer
Follow this Question
Related Questions
How to get the camera's size in world units 1 Answer
My camera script is having a lot of problems..... 2 Answers
Script Help -- OnCollisionEnter2D 1 Answer
Hello, i am new to Unity and would like help making a player mechanic. 0 Answers
First Person Controller - Problems with footstep audio being played too fast. 0 Answers