On Fri, 21 Jan 2005 19:08:13 -0600, Justin Harvey <[EMAIL PROTECTED]> wrote:
> You should pick up a book on basic 3D math, like '3D Math Primer' or the
> like.
>

Yes.  3D math is good.  You want to create an offset vector that is
constantly lerping (use google.com to find "lerp") between the
original eye position and the final offset location.  This vector will
be the "right" vector (cross product of UP and FORWARD) and will be
positive going to your right and negative going to your left.  You
want to constantly be calculating the offset vector (lerping it) as
the player moves around (you don't want to precalculate the end
position and gradually move from start to end since the end position
will be incorrect when the player moves during this transition).  You
might also want to use slerp instead of lerp if you want the eye
position to follow a curved path (instead of a straight line).

If you don't know what "lerp", "slerp", or "cross product" is, you
should buy a good 3D math book like Justin recommended, read it, then
come back and write your leaning code.

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to