Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualirlanrobson

Posted 23 September 2013 - 08:12 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);


Vector3 vecStart = vecPos (current camera position);
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );


if( Length(vecEnd - vecStart) > 0.0)
{

//interpolate
vecPos = vecStart + (vecEnd - vecStart) * t;


//camera variables
vecX = player->GetRotMatrix().GetX();
vecY = player->GetRotMatrix().GetY();
vecZ = player->GetRotMatrix().GetZ();

//camera view matrix
matView = MatrixLookAt(vecPos, player->GetPosition(), Vector3(0, 1, 0) );
}
 
Update the camera position by the half of the frame time based on the camera offset.

#5irlanrobson

Posted 23 September 2013 - 08:11 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);


Vector3 vecStart = vecPos (current camera position);
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );


if( Length(vecEnd - vecStart) > 0.0)
{

//interpolate
vecPos = vecStart + (vecEnd - vecStart) * t;


//camera variables
vecX = player->GetRotMatrix().GetX();
vecY = player->GetRotMatrix().GetY();
vecZ = player->GetRotMatrix().GetZ();


matView = MatrixLookAt(vecPos, player->GetPosition(), Vector3(0, 1, 0) );
}
 
Update the camera position by the half of the frame time based on the camera offset.

#4irlanrobson

Posted 23 September 2013 - 08:11 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);
 
Vector3 vecStart = vecPos (current camera position);
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );
 
if( Length(vecEnd - vecStart) > 0.0)
{
 
//interpolate
vecPos = vecStart + (vecEnd - vecStart) * t;
 
//camera variables
vecX = player->GetRotMatrix().GetX();
vecY = player->GetRotMatrix().GetY();
vecZ = player->GetRotMatrix().GetZ();
 
matView = MatrixLookAt(vecPos, player->GetPosition(), Vector3(0, 1, 0) );
}
 
Update the camera position by the half of the frame time based on the camera offset.

#3irlanrobson

Posted 23 September 2013 - 08:10 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);
 
Vector3 vecStart = vecPos (current camera position);
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );
 
if( Length(vecEnd - vecStart) > 0.0)
{
/*Interpolate*/
vecPos = vecStart + (vecEnd - vecStart) * t;
 
vecX = player->GetRotMatrix().GetX();
vecY = player->GetRotMatrix().GetY();
vecZ = player->GetRotMatrix().GetZ();
 
matView = MatrixLookAt(vecPos, player->GetPosition(), Vector3(0, 1, 0) );
}
 
Update the camera position by the half of the frame time based on the camera offset.

#2irlanrobson

Posted 23 September 2013 - 08:10 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);
 
Vector3 vecStart = vecPos (current camera position);
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );
 
Update the camera position by the half of the frame time based on the camera offset.

#1irlanrobson

Posted 23 September 2013 - 08:09 AM

@BlueSpud
 
I do like that:
 
float frameTime = GetFrameTime();
float t = (frameTime * 2.0);
 
Vector3 vecStart = vecPos;
Vector3 vecEnd = player->GetCamOffset() * ( player->GetWorldMatrix() );
 
Update the camera position by the half of the frame time based on the camera offset.

PARTNERS