Fixed crash trying to update simple cameras.

This commit is contained in:
leo 2015-01-17 01:47:36 +00:00
parent 88e935ccd8
commit 3d79dbd8cc

View file

@ -446,9 +446,12 @@ void lcCamera::Move(lcStep Step, bool AddKey, const lcVector3& Distance)
void lcCamera::UpdatePosition(lcStep Step)
{
if (!IsSimple())
{
mPosition = CalculateKey(mPositionKeys, Step);
mTargetPosition = CalculateKey(mTargetPositionKeys, Step);
mUpVector = CalculateKey(mUpVectorKeys, Step);
}
lcVector3 FrontVector(mPosition - mTargetPosition);
lcVector3 SideVector = lcCross(FrontVector, mUpVector);