fix unreal/senseglove coordinates translation calculations

This commit is contained in:
Mamadou Babaei
2022-11-11 11:41:41 +01:00
parent 208d08f211
commit e72d052799
2 changed files with 12 additions and 12 deletions
@@ -171,10 +171,10 @@ FSGQuatImpl::FSGQuatImpl(const FQuat& Quat)
/// Right Y /// Right Y
/// Up Z /// Up Z
/// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations:
/// Forward Y /// Forward X
/// Right X /// Right Y
/// Up Z /// 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) FSGQuatImpl::FSGQuatImpl(const FSGQuatImpl& Rhs)
@@ -214,10 +214,10 @@ FQuat FSGQuatImpl::ToFQuat() const
/// Right Y /// Right Y
/// Up Z /// Up Z
/// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations:
/// Forward Y /// Forward X
/// Right X /// Left Y
/// Up Z /// 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 FSGQuatImpl FSGQuatImpl::operator*(const FSGQuatImpl& QuatImpl) const
@@ -129,10 +129,10 @@ FSGVect3DImpl::FSGVect3DImpl(const FVector& Vector)
/// Right Y /// Right Y
/// Up Z /// Up Z
/// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations:
/// Forward Y /// Forward X
/// Right X /// Right Y
/// Up Z /// Up Z
FVect3DType Vect3D(Vector.Y, Vector.X, Vector.Z); FVect3DType Vect3D(Vector.X, -Vector.Y, Vector.Z);
/// NOTE /// NOTE
/// Unreal Engine uses the Metric System and centimeters as its default unit for measuring distance/length; /// Unreal Engine uses the Metric System and centimeters as its default unit for measuring distance/length;
@@ -179,10 +179,10 @@ FVector FSGVect3DImpl::ToFVector() const
/// Right Y /// Right Y
/// Up Z /// Up Z
/// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations:
/// Forward Y /// Forward X
/// Right X /// Right Y
/// Up Z /// Up Z
FVector Vector(Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetX(), Pimpl->Vect3D.GetZ()); FVector Vector(Pimpl->Vect3D.GetX(), -Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetZ());
/// NOTE /// NOTE
/// Unreal Engine uses the Metric System and centimeters as its default unit for measuring distance/length; /// Unreal Engine uses the Metric System and centimeters as its default unit for measuring distance/length;