Files
sbox-public/engine/Sandbox.Engine/Systems/Physics/PhysicsBody.Locks.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

39 lines
777 B
C#

namespace Sandbox;
[Expose]
public struct PhysicsLock
{
public PhysicsLock()
{
}
public bool X { get; set; }
public bool Y { get; set; }
public bool Z { get; set; }
public bool Pitch { get; set; }
public bool Yaw { get; set; }
public bool Roll { get; set; }
}
/// <summary>
/// Represents a physics object. An entity can have multiple physics objects. See <see cref="PhysicsGroup">PhysicsGroup</see>.
/// A physics objects consists of one or more <see cref="PhysicsShape">PhysicsShape</see>s.
/// </summary>
public sealed partial class PhysicsBody : IHandle
{
PhysicsLock _locks;
public PhysicsLock Locking
{
get => _locks;
set
{
_locks = value;
native.SetMotionLocks( value.X, value.Y, value.Z, value.Pitch, value.Yaw, value.Roll );
}
}
}