Re: [Plib-users] 3rd person camera
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2000-05-27 04:35:15
|
Trent Gamblin wrote:
>
> * Steve Baker <sjb...@ai...> wrote:
> > There is code in my Tux game to do that - but it doesn't help as
> > much as I thought - it's really hard to figure out where to move
> > the camera in the event that there is something in the line of
> > sight.
> >
> > Camera positioning is a MAJOR problem!
>
> No kidding. I've been working on it for days, but I just can't get it
> right. I've been looking at Zelda 64 (great game), and trying to see
> how the camera is done there. There seems to be a couple things
> happening:
>
> - The camera doesn't totally stay right behind you, but if you turn
> and walk in one direction the camera turns a little too. This alone
> seems to eliminate most problems, because if you walk behind
> something, the camera adjusts so you can still see the player.
>
> - The camera slowly centers behind the player after a few seconds
> (or you can center it yourself with the z button).
>
> - If you walk up to a wall, face the other way, and center the
> camera, it moves in closer, to the other side of the wall. This is
> where I'm stuck. I can't get it to work.
>
> - If all else fails, the camera goes up high.
You should check back in the archives (either this list or
plib-devel or possibly the tuxaqfh-users list - all on
sourceforge) - there was a prolonged discussion of camera
stuff there.
The problem with the scheme you suggest is that it fails
to distinguish these cases:
<----* Player
__________
|
Building |
| * Camera
__________|
The camera has to move pretty fast to
get around the building.
But in this case (where the 'X's are trees or something):
<----* Player
X X X X
* Camera
...you don't want the camera rocketing back and forth
all the time as each treetrunk gets between the player
and the camera.
One approach is to slow down the decision to move a
big distance in the hope that the player will shortly
reappear...but whatever you do gets ugly sometimes.
I've decided that the problem comes down to the art of
cinematography...which is something that takes a lifetime
to learn and which would need the brain of a great director
to get right :-)
--
Steve Baker http://web2.airmail.net/sjbaker1
sjb...@ai... (home) http://www.woodsoup.org/~sbaker
sj...@ht... (work)
|