Pose mode improvements

This commit is contained in:
Katboi01
2023-12-18 17:20:34 +01:00
parent f928a802d7
commit 9405816231
31 changed files with 8225 additions and 387 deletions
@@ -50,4 +50,20 @@ public class SerializableTransform
t.localScale = Scale;
}
}
public void ApplyTo(Transform t, PoseLoadOptions options)
{
if (Space == Space.World)
{
if (options.Position) t.position = Position;
if (options.Rotation) t.eulerAngles = Rotation;
if (options.Scale) t.localScale = Scale;
}
else
{
if (options.Position) t.localPosition = Position;
if (options.Rotation) t.localEulerAngles = Rotation;
if (options.Scale) t.localScale = Scale;
}
}
}