mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
lighting and correct rotation ZY swap
This commit is contained in:
1 parent
333c310d5b
commit
c6f8c1e6a5
4 files changed
+25
-7
No files matched your search
@@ -86,7 +86,7 @@ public class MonoGltf
|
||||
|
||||
if (transform.TryGet<FQuat>("Rotation", out var rotation))
|
||||
{
|
||||
parent.WithLocalRotation(rotation);
|
||||
parent.WithLocalRotation(SwapYZ(rotation));
|
||||
}
|
||||
|
||||
if (transform.TryGet<FVector>("Translation", out var translation))
|
||||
@@ -279,6 +279,11 @@ public class MonoGltf
|
||||
return res;
|
||||
}
|
||||
|
||||
public static Quaternion SwapYZ(Quaternion q)
|
||||
{
|
||||
return Quaternion.Normalize(new Quaternion(q.X, q.Z, q.Y, -q.W));
|
||||
}
|
||||
|
||||
public static FVector SwapYZAndNormalize(FVector vec)
|
||||
{
|
||||
var res = SwapYZ(vec);
|
||||
|
||||
Reference in new issue
Block a user