diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a5c1277..f401b7ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Breaking API/ABI changes in the Settings and the main SenseGlove module due to some settings refactoring. +- Breaking changes in the SenseGlove/Unreal coordinates systems conversions due to underlying changes in the SenseGlove Core Libraries. ## [v1.2.1] - 2023-03-30 diff --git a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp index b73baf6e..1b8fed4c 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp @@ -154,7 +154,7 @@ FSGQuatImpl::FSGQuatImpl(const FQuat& Quat) /// Forward X /// Right Y /// Up Z - Pimpl->Quat = FQuatType(-Quat.X, Quat.Y, -Quat.Z, Quat.W); + Pimpl->Quat = FQuatType(-Quat.Y, -Quat.X, -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.GetX(), Pimpl->Quat.GetY(), -Pimpl->Quat.GetZ(), Pimpl->Quat.GetW()); + return FQuat(-Pimpl->Quat.GetY(), -Pimpl->Quat.GetX(), -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 69f812bf..56915cca 100644 --- a/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp +++ b/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp @@ -113,7 +113,7 @@ FSGVect3DImpl::FSGVect3DImpl(const FVector& Vector) /// Right Y /// Up Z - FVect3DType Vect3D(Vector.X, -Vector.Y, Vector.Z); + FVect3DType Vect3D(Vector.Y, Vector.X, Vector.Z); Pimpl->Vect3D = MoveTemp(Vect3D); } @@ -153,7 +153,7 @@ FVector FSGVect3DImpl::ToFVector() const /// Right Y /// Up Z - FVector Vector(Pimpl->Vect3D.GetX(), -Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetZ()); + FVector Vector(Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetX(), Pimpl->Vect3D.GetZ()); return MoveTemp(Vector); }