-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
Description
What about to wrap the function from source-sdk 2013 mathlib
void VectorVectors( const Vector &forward, Vector &right, Vector &up )
{
Assert( s_bMathlibInitialized );
Vector tmp;
if (forward[0] == 0 && forward[1] == 0)
{
// pitch 90 degrees up/down from identity
right[0] = 0;
right[1] = -1;
right[2] = 0;
up[0] = -forward[2];
up[1] = 0;
up[2] = 0;
}
else
{
tmp[0] = 0; tmp[1] = 0; tmp[2] = 1.0;
CrossProduct( forward, tmp, right );
VectorNormalize( right );
CrossProduct( right, forward, up );
VectorNormalize( up );
}
}vinci6k