diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp index 38d23637..f0d78916 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp @@ -152,9 +152,9 @@ FSGQuatImpl::FSGQuatImpl(const FQuat& Quat) /// Up Z /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// Forward X - /// Right Y + /// Left Y /// Up Z - Pimpl->Quat = FQuatType(-Quat.Y, -Quat.X, -Quat.Z, Quat.W); + Pimpl->Quat = FQuatType(-Quat.X, Quat.Y, -Quat.Z, Quat.W); } FSGQuatImpl::FSGQuatImpl(const FSGQuatImpl& Rhs) @@ -192,7 +192,7 @@ FQuat FSGQuatImpl::ToFQuat() const /// Forward X /// Left Y /// Up Z - return FQuat(-Pimpl->Quat.GetY(), -Pimpl->Quat.GetX(), -Pimpl->Quat.GetZ(), Pimpl->Quat.GetW()); + return FQuat(-Pimpl->Quat.GetX(), Pimpl->Quat.GetY(), -Pimpl->Quat.GetZ(), Pimpl->Quat.GetW()); } FSGQuatImpl FSGQuatImpl::operator*(const FSGQuatImpl& QuatImpl) const diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp index f0091f59..21cd3212 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp @@ -110,10 +110,10 @@ FSGVect3DImpl::FSGVect3DImpl(const FVector& Vector) /// Up Z /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// Forward X - /// Right Y + /// Left Y /// Up Z - FVect3DType Vect3D(Vector.Y, Vector.X, Vector.Z); + FVect3DType Vect3D(Vector.X, -Vector.Y, Vector.Z); Pimpl->Vect3D = MoveTemp(Vect3D); } @@ -150,10 +150,10 @@ FVector FSGVect3DImpl::ToFVector() const /// Up Z /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// Forward X - /// Right Y + /// Left Y /// Up Z - FVector Vector(Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetX(), Pimpl->Vect3D.GetZ()); + FVector Vector(Pimpl->Vect3D.GetX(), -Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetZ()); return MoveTemp(Vector); }