Frictional Games Forum (read-only)

Full Version: How do video game cameras work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do video game cameras work? what I mean is the view point. Like in Gears of War the camerea is behind the player the whole time.
I don't know about the "under the hood" rendering stuff but there is an actual camera entity that is attached to the player pawn(Main character), who's relative position and rotation can be set via scripting.

This camera entity is local to that specific pawn, and decides everything that is drawn on that player's screen.
If the player goes off the map (like lets say in Amnesia there was an area where the player could get off the map accidentally) would camera be able to follow or it would the camera just glitch (because it cant find you)?
I don't know about Amnesia, but in Unreal the camera is always attached to the pawn. Unless that pawn dies(through fall damage, weapon damage, or killz damage(Falling out of the map)), in which case the camera goes into spectator mode unless told otherwise.(Either respawn or pre-scripted special behavior.)
(09-06-2012, 04:01 AM)darkely Wrote: [ -> ]If the player goes off the map (like lets say in Amnesia there was an area where the player could get off the map accidentally) would camera be able to follow or it would the camera just glitch (because it cant find you)?
In Amnesia's case, there is no "player", just an invisible cylinder with 1 hand that can hold a lantern. There is no possibility of the camera "detaching" from the player. You could use a few script functions to distort the angle and field of view, but it is still technically part of the player.
So pretty much in Amnesias case you technically are the camera. Well I am more interested in third person cameras like in Dead Space...

Image: http://i.imgur.com/JP7oI.jpg

The camera can spin around the player (all the way) however the camera when looking forward is always slightly to the right of the player. Is this to give the player room to see what is going on or what?
I'd say the camera is angled in a way that gives you a clear shot at enemies.

It's also pretty engine specific. While I am pretty sure most engines use some sort of Camera entity, how they handle it may be completely different.

I don't know anything about HPL though. If that's what you are looking for, I'm afraid I cannot provide tech assistance.
I'm not so much looking for tech. help but just something I notice in games and figured I would ask Tongue - thats why I put it in the off-topic section.
(09-06-2012, 04:24 AM)darkely Wrote: [ -> ]I'm not so much looking for tech. help but just something I notice in games and figured I would ask Tongue - thats why I put it in the off-topic section.
Off-Topic = I see what you did there (signature)

Spoiler below!

Bulletstorm


On-Topic = I have no knowledge on how the camera in Dead Space works, but I also noticed that it works the same way in Resident Evil 5. They use the same engine.

I'm guessing it is scripted in the engine to work that way.
If I remember correctly, the now typical "over the shoulder" third person view was popularized after it's use in Resident Evil 4.
Pages: 1 2