PDA

View Full Version : Can I Make a Camera Follow an Object?



ZipCity
01-20-2011, 09:01 PM
Instead of the player?

For example, if you were to make a pinball game (with the player hidden and on a controlinator), can you make the camera follow the ball around?

Aya042
01-20-2011, 09:09 PM
Instead of the player?

Just attach a Movie Camera to the object you want the camera to follow.

ZipCity
01-20-2011, 09:12 PM
Can I attach a key tag to that camera so that it only follows while within a defined zone? I would need the camera to "turn off" and focus back to the player after each "turn" in my mini game

Aya042
01-20-2011, 10:26 PM
Can I attach a key tag to that camera so that it only follows while within a defined zone?

The camera can be enabled and disabled with logic, although there was an oddity in the beta where in order to restore the default camera from a Movie Camera with infinite "Hold Time", you'd have to enable a second camera with a very short Hold Time.

My impression is that a Movie Camera's "enable" is like a one-shot, so the only way to disable it is to enable another Movie Camera, BICBW.

RoharDragontamer
01-20-2011, 10:57 PM
The camera can be enabled and disabled with logic, although there was an oddity in the beta where in order to restore the default camera from a Movie Camera with infinite "Hold Time", you'd have to enable a second camera with a very short Hold Time.

My impression is that a Movie Camera's "enable" is like a one-shot, so the only way to disable it is to enable another Movie Camera, BICBW.

You can make a smooth transition to a game camera without a second short hold time movie camera by placing a movie camera on a sequencer.

A little tutorial on movie cameras and sequencers.
If you place a movie camera that starts on the left edge of the sequencer circuitboard, the movie camera will be "live" when the sequencer is "off" (the movie gadget exists at the 0% mark of the sequencer.) A movie camera will also stay live at the end of a sequencer if the right edge of the movie camera ends on the right edge of the sequencer. (the movie gadget exists at the 100% mark on the sequencer). If you make your movie camera one snap shorter than the sequencer on each end, it will be off when the sequencer is at 0% and turn off when the sequencer ends.

So.. to get fine control of a movie camera, I place a camera that is placed on the first half of a sequencer, but starting one snap point from the left edge. I set the sequencer input to POSITIONAL. and set up a logic circuit to send a 25% and 75% signal to the sequencer. When I send a 25% signal the camera turns on, when I send a 75%, the signal ends.

On the level I'm working on now I created a hologram that follows a sackbot player, with my movie sequencer attached. It follows the sackbot at a 10% hold, then when the sackbot arrives at its destination, I unlock the hologram from the sackbot, allow the sackbot to move away, and release the rest of the sequencer which goes through a few camera pans on fixed objects. (Actually, I set a timer to on/off with the same time length as the sequencer, start with the timer at 10% and off, then simply turn the timer on when sackbot gets where he's going.) It works great because it allows the camera to truck and pan, instead of cutting.

Cauan-XV
01-20-2011, 11:45 PM
Just attach a Movie Camera to the object you want the camera to follow.

+1

Thanks!