camera script

i need a camera script so it will follow a actor.

Well, at least it gets to the point… %|

If you want some sort of simple follow the character’s back type of thing, you can parent the camera to the character. Select the camera, then select the character. Then you either hit ctrl-p (normal parent) or ctrl-alt-p
(vertex parent). Normal parenting makes the camera move and rotate with the character. Vertex parenting makes the camera move with the character but not rotate.

If you want the camera to be a little less stiff, you can do a thing called slow par. ONce you’ve parented, you can go to the animation buttons (F7) and click the button labled slow par. Then you can mess with the property called TimeOffset to make the camera’s movement a little less stiff.

Does that help? :smiley:


Thanks man that will be cool in my game :smiley:

but then objects are weeeeeeeeeeeery wide!!!

but then objects are weeeeeeeeeeeery wide!!!

Another way to make a less stiff camera is to use an “always” sensor to “and” controller to a “camera” actuator. It has a min max setting for distance, and a height setting. It doesn’t always stay behind the player, though. For the objects looking wide I found that if I go into camera view and then use my mouse scroll it changes that but also makes the objects appear closer. There’s probably other ways of setting it.

Pooba, i tried the technique with vertex parenting, you say that it would parent without rotation. The ctrl-alt-p shortcut does nothing in my blender 2.34. I didn’t found any info about vertex parenting in the Blender manual (which describes only the normal parenting with ctrl-p and undoing the parenting with alt-p). I need this functionality to parent a sky dome to the camera, it must follow the camera on the x,y,z axis but never rotate, get it? Does anyone knows how to do that?

While this question is about cameras is there any script that will rotate the camera quickly to the direction on the x,y axis the actor is going while maintaining the same distance? I looked at the python reference and I don’t have a clue.