mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Fixed crash trying to update simple cameras.
This commit is contained in:
parent
88e935ccd8
commit
3d79dbd8cc
1 changed files with 6 additions and 3 deletions
|
@ -446,9 +446,12 @@ void lcCamera::Move(lcStep Step, bool AddKey, const lcVector3& Distance)
|
||||||
|
|
||||||
void lcCamera::UpdatePosition(lcStep Step)
|
void lcCamera::UpdatePosition(lcStep Step)
|
||||||
{
|
{
|
||||||
mPosition = CalculateKey(mPositionKeys, Step);
|
if (!IsSimple())
|
||||||
mTargetPosition = CalculateKey(mTargetPositionKeys, Step);
|
{
|
||||||
mUpVector = CalculateKey(mUpVectorKeys, Step);
|
mPosition = CalculateKey(mPositionKeys, Step);
|
||||||
|
mTargetPosition = CalculateKey(mTargetPositionKeys, Step);
|
||||||
|
mUpVector = CalculateKey(mUpVectorKeys, Step);
|
||||||
|
}
|
||||||
|
|
||||||
lcVector3 FrontVector(mPosition - mTargetPosition);
|
lcVector3 FrontVector(mPosition - mTargetPosition);
|
||||||
lcVector3 SideVector = lcCross(FrontVector, mUpVector);
|
lcVector3 SideVector = lcCross(FrontVector, mUpVector);
|
||||||
|
|
Loading…
Reference in a new issue