ScriptCore: Added Transform.WorldTransform

This commit is contained in:
Simon Lübeß
2024-02-19 21:39:07 +01:00
parent 1ca9746921
commit 0a822dcd79
3 changed files with 56 additions and 0 deletions
+13
View File
@@ -36,6 +36,19 @@ public class Transform : Component
}
set => ScriptGlue.Transform_SetTranslation(Entity.UUID, in value);
}
/// <summary>
/// Gets or sets the translation (position) of the entity in global space.
/// </summary>
public float3 WorldTranslation
{
get
{
ScriptGlue.Transform_GetWorldTranslation(Entity.UUID, out float3 translation);
return translation;
}
set => ScriptGlue.Transform_SetWorldTranslation(Entity.UUID, in value);
}
/// <summary>
/// Gets or sets the rotation of the entity.