Get/Set FixedRotation in play mode

This commit is contained in:
Simon Lübeß
2024-01-26 12:51:29 +01:00
parent d4d6cc8e38
commit bc535ddc26
6 changed files with 58 additions and 5 deletions
+15 -1
View File
@@ -75,7 +75,7 @@ public class Rigidbody2D : Component
}
/// <summary>
/// Gets or sets the angulara velocity of the rigidbody.
/// Gets or sets the angular velocity of the rigidbody.
/// </summary>
public float AngularVelocity
{
@@ -87,4 +87,18 @@ public class Rigidbody2D : Component
}
set => ScriptGlue.Rigidbody2D_SetAngularVelocity(_uuid, value);
}
/// <summary>
/// Gets or sets whether the rigidbody can rotate or not.
/// </summary>
public bool FixedRotation
{
get
{
ScriptGlue.Rigidbody2D_IsFixedRotation(_uuid, out bool isFixedRotation);
return isFixedRotation;
}
set => ScriptGlue.Rigidbody2D_SetFixedRotation(_uuid, value);
}
}