mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-02 08:50:18 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
62 lines
1.3 KiB
C#
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 { }
|
|
}
|
|
}
|