Ya its work, but its only for game systems, not for player origin.

Can u help me figure out wall detecting, for not falls off to wall, and
for not only game vector changed, but camera vector chagne too.
and interpolation some out here.

here is video :
http://www.youtube.com/watch?v=Ae2dCU08X7Q

here is code :

Vector CBaseEntity::EyePosition( void )
{
        CBasePlayer *pPlayer = ToBasePlayer( this );
        if (IsPlayer())
        {
                Vector vO = m_vecViewOffset;

                QAngle angEye = EyeAngles();

                // TODO : Move these to EyeAngles() ?
                if ( pPlayer->m_nButtons & IN_LEAN_L )
                {
                        angEye[ROLL] -= 30;
                }
                if ( pPlayer->m_nButtons & IN_LEAN_R )
                {
                        angEye[ROLL] += 30;
                }

                // BUGBUG : must be null or player falls off when mouse
moved up/dn
                angEye[PITCH] = 0;

                matrix3x4_t eyeMatrix, offsetMatrix, output;
                AngleMatrix( angEye , vec3_origin , eyeMatrix );
                AngleMatrix( vec3_angle ,vO , offsetMatrix );

                ConcatTransforms( eyeMatrix, offsetMatrix , output );

                Vector eyePos;

                MatrixGetColumn( output, 3, eyePos );

                return GetAbsOrigin() + eyePos;
        }
        else
        {
                return GetAbsOrigin() + m_vecViewOffset;
        }
}


----------------------------------------

Vitaliy

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

Reply via email to