From 2a816469d564d0d49d0750a690db47004cb43880 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Fri, 31 Jan 2014 14:40:09 +0100 Subject: [PATCH] SnapAngularAxis fix --- Code/OysterMath/LinearMath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;