- Home /
Camera follow rotating ball
What is the most efficient way of making a camera follow a rotating ball without any jerkiness? I've tried smooth follow (and countless other methods) but the camera is still very jittery. Basically, I need the camera to follow my rotating ball from a set distance behind. How might I go about this? Any suggestions would be greatly appreciated. Thanks!
Answer by Tim.Holman · Aug 31, 2011 at 05:18 PM
I figured out a way to achieve this. I took an empty game object and set it's coordinates to match that of the golf ball. (I didn't attach it, as that would also translate rotation). Then, I attached the smooth follow script to the camera (which can be found in the standard assets) and made the empty game object the target. All set... for now.
Answer by genetixsparkz · Aug 31, 2011 at 04:10 PM
in unity editor take the camera and drag it on top of the ball, that makes the camera a child of the ball, now the camera's position is local not world, its position is always relative to the ball. so even though it's position is 1,10,0 thats 1 away,10 away,0 away from the ball always, if the ball moves it moves.
I am well aware of this concept. It is actually better practice to keep the camera seperate from the game object and control it through a script. In either case, I need my camera to follow the ball WITHOUT rotating with it. Think of it as an invisible $$anonymous$$ther that keeps the camera directly behind the ball at all times... I'm probably over thinking this one as it should be a simple fix.
contraint rotation around all axis's?
assu$$anonymous$$g you attach a rigidbody to the camera (even an empty shell for this purpose alone
camera.rigidbody.constraint
Your answer
Follow this Question
Related Questions
Camera rotation around player while following. 6 Answers
Rotate camera around player 2 Answers
Super Monkey Ball type Camera? 2 Answers
Making a camera that follows a rigidbodied sphere. 2 Answers
Minimap rotation 2 Answers