Skip to content

Commit

Permalink
[core] tentative fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlyr committed Oct 4, 2024
1 parent 1d2e7a6 commit 4daaf06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Asset/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void Camera::setDirection( const Core::Vector3& direction ) {

// Special case if two directions are exactly opposites we constrain.
// to rotate around the up vector.
if ( c.isApprox( Core::Vector3::Zero() ) && d < 0.0 ) {
if ( Math::areApproxEqual( c.squaredNorm(), 0_ra ) && d < 0_ra ) {
T.rotate( Core::AngleAxis( Core::Math::Pi, getUpVector() ) );
}
else { T.rotate( Core::Quaternion::FromTwoVectors( d0, d1 ) ); }
Expand Down

0 comments on commit 4daaf06

Please sign in to comment.