Are there any hidden function that will return the true state? This function alone is great in all but lacking control..
for example..
my class redirection.
void Camera::setToFollow ( float fX, float fY, float fZ, float fAngle, float fDistance, float fHeight, float fSmooth, int iCollision ) {
dbSetCameraToFollow(m_iID,fX,fY,fZ,fAngle,fDistance,fHeight,fSmooth,iCollision );
}
I can do something like this to stop it from jumping around..
void Camera::panTo ( Vector3 vObject ){
Vector3 vHold = getAngle(); //over ride for smoothness
setToFollow( vObject.getX() ,vObject.getY(), vObject.getZ(), swivelPosition, camDist, camHeight, camSmoothing, collision );
rotate(vHold);// over ride for smoothness
}
this way if I turn it will slide to the location with out rotating the cam. Seems smoothing was added to position but not angle. So forget about gassing unless you do this. Then I use the point comment to assume, control next with a nice swivel effect..
void Camera::centerCam(float fTarget, Vector3 vObject, float fSpeed, int iFlag){
Vector3 vHold; vHold = getAngle(); //over ride for smoothness
swivelPosition = ModularPivot(swivelPosition, fTarget, 2, .05);
setToFollow( vObject.getX() ,vObject.getY(), vObject.getZ(), swivelPosition, camDist, camHeight, camSmoothing, collision );
rotate(vHold); //over ride for smoothness
//lock in..
point ( vObject.getX() ,vObject.getY(), vObject.getZ() );
}
but I need to do one and once I get a return flag do the other.
if (// are we there yet?)
{// no? ok pan....
panTo ( Vector3 vObject );
}
else
{// yes? ok center it..
centerCam(fTarget,vObject ,fSpeed, iFlag);
}
any thoughts, aside from re inventing the math?