mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Get/Set FixedRotation in play mode
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user