proper angle conversions for vectors

This commit is contained in:
Mamadou Babaei
2024-03-22 20:59:22 +01:00
parent f08dbf57b9
commit 9b5beaaf61
@@ -55,13 +55,13 @@ public:
static FORCEINLINE FVector TransformToSenseGlove(const FVector& Vector)
{
return FMath::DegreesToRadians(FVector(-Vector.Y, Vector.X, Vector.Z));
return FMath::DegreesToRadians(FVector(-Vector.X, Vector.Y, -Vector.Z));
}
template<typename V>
static FORCEINLINE V TransformToSenseGlove(const FVector& Vector)
{
return FMath::DegreesToRadians(V(-Vector.Y, Vector.X, Vector.Z));
return FMath::DegreesToRadians(V(-Vector.X, Vector.Y, -Vector.Z));
}
static FORCEINLINE float TransformToUnreal(const float Radians)
@@ -114,13 +114,13 @@ public:
static FORCEINLINE FVector TransformToUnreal(const FVector& Vector)
{
return FMath::RadiansToDegrees(FVector(-Vector.Y, Vector.X, Vector.Z));
return FMath::RadiansToDegrees(FVector(-Vector.X, Vector.Y, -Vector.Z));
}
template<typename V>
static FORCEINLINE FVector TransformToUnreal(const V& Vector)
{
return FMath::RadiansToDegrees(FVector(-Vector.GetY(), Vector.GetX(), Vector.GetZ()));
return FMath::RadiansToDegrees(FVector(-Vector.GetX(), Vector.GetY(), -Vector.GetZ()));
}
public: