Skip to content

Commit

Permalink
Fix crash from zero quat
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Oct 4, 2024
1 parent e227df6 commit a738036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MoveToHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void MoveToHelper::MoveTo(const CameraPtr &_camera,
else
key->Translation(start.Pos());

if (_target.Rot().IsFinite())
if (_target.Rot().IsFinite() && _target.Rot() != math::Quaterniond::Zero)
key->Rotation(_target.Rot());
else
key->Rotation(start.Rot());
Expand Down

0 comments on commit a738036

Please sign in to comment.