Files
sbox-public/engine/Sandbox.Engine/Systems/Physics/Joints/SpringJoint.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

62 lines
1.3 KiB
C#

namespace Sandbox.Physics;
/// <summary>
/// A rope-like constraint that is has springy/bouncy.
/// </summary>
public partial class SpringJoint : PhysicsJoint
{
internal SpringJoint( HandleCreationData _ ) { }
/// <summary>
/// How springy and tight the joint will be
/// </summary>
public PhysicsSpring SpringLinear
{
get => native.GetLinearSpring();
set => native.SetLinearSpring( value );
}
/// <summary>
/// Maximum length it should be allowed to go
/// </summary>
public float MaxLength
{
get => native.GetMaxLength();
set => native.SetMaxLength( value );
}
/// <summary>
/// Minimum length it should be allowed to go. At which point it acts a bit like a rod.
/// </summary>
public float MinLength
{
get => native.GetMinLength();
set => native.SetMinLength( value );
}
/// <summary>
/// Maximum force it should be allowed to go. Set to zero to only allow stretching.
/// </summary>
public float MaxForce
{
get => native.GetMaxForce();
set => native.SetMaxForce( value );
}
/// <summary>
/// Minimum force it should be allowed to go.
/// </summary>
public float MinForce
{
get => native.GetMinForce();
set => native.SetMinForce( value );
}
[Obsolete( "doesn't exist, not used" )]
public float ReferenceMass
{
get => default;
set { }
}
}