- Home /
camera focus on sphere
Hello, all. I have a question about the camera and a rolling ball. I want the camera to follow the sphere (marble ball) when it rolls, but when i put the camera into the sphere at the Hierarchy the camera turns and turn and you can't look. How can i fix this? Ty, already
Comment
Answer by Berenger · Jun 06, 2012 at 03:37 PM
You need a script that modify the camera's transform according the the ball's transform. You will probably need to use LookAt and something like transform.position = ball.position - offset. The next step will be to make sure the camera is always oriented towards the ball's movement direction, but I'll leave that to you !