diff --git a/Code/OysterMath/LinearMath.h b/Code/OysterMath/LinearMath.h index 0a4611b1..dce7a026 100644 --- a/Code/OysterMath/LinearMath.h +++ b/Code/OysterMath/LinearMath.h @@ -750,7 +750,7 @@ namespace LinearAlgebra3D template ::LinearAlgebra::Vector4 & SnapAngularAxis( ::LinearAlgebra::Vector4 &startAngularAxis, const ::LinearAlgebra::Vector4 &localStartNormal, const ::LinearAlgebra::Vector4 &worldEndNormal, ::LinearAlgebra::Vector4 &targetMem = ::LinearAlgebra::Vector4() ) { - ::LinearAlgebra::Vector4 worldStartNormal( WorldAxisOf(Rotation(startAngularAxis.xyz), localStartNormal), (ScalarType)0 ); + ::LinearAlgebra::Vector4 worldStartNormal( WorldAxisOf(Rotation(startAngularAxis.xyz), localStartNormal.xyz), (ScalarType)0 ); targetMem = ::LinearAlgebra::Vector4( worldStartNormal.xyz.Cross(worldEndNormal.xyz), (ScalarType)0); targetMem *= (ScalarType)::std::acos( worldStartNormal.Dot(worldEndNormal) ); return targetMem += startAngularAxis;