How do i get a camera to follow an added object?

(ineedanewbi) #1

im makeing a short soccer game

every player has a fake soccerball parented to them (easier dribbling)

and when they kick the ball away the REAL soccer ball is added

how do i get the camera to follow/track to/be parented to the REAL soccer ball when it is added?

(rav_bhara) #2

make the camera track to ob:ball (or whatever its called), do 3d tracking

(ineedanewbi) #3

i tried that, but when the ball is added, the camera thinks as if the ball has never moved… the cam looks at its original position

does anyone have another way to make the camera follow the players and the ball when it is kicked?

i really need your help


(gargola) #4

i assum you have 2 cameras,right? then make the player or whatever to send a message when it kicks the ball to set the second camera.check what’s the name of the second camera…then when you add an actuator,click on scene…then,set camera and in OB: type the name of the second camera.make sure to set the second camera to follow the object that you want to follow.that should do it.hope that helps.if you still need help send me a mail an i can make a quick example for you. :smiley:

ps: i learned that from Saluk. :smiley:

(ineedanewbi) #5

thanks…well … if it were only that simple

unfortunatly the REAL DYNAMIC soccer ball starts on an unactive layer
it is only added when the player kicks it away

when i set it to the camera parented to the REAL BALL or track to the REAL BALL, the camera gets wacked up and thinks the ball is where it started on the unactive layer

maybe there is another way i can make a good soccer game…

the camera is on the sideline and is vertex-parented to the player (currently) with about a 30 depression

here is a pic of it from another cam angle, looks cool, but not good to play with.

someone please help… maybe python/saluk can help?

(lizard809) #6

here’s a great example:

(ineedanewbi) #7

WOW :smiley:

thanks , that was EXACTLY what i needed

now i can make my camera follow the added object

AMAZEING… makes me wish i knew more about python

thanks again