s&box docs

public abstract class Sandbox.Joint : Sandbox.Component

Constructors

Showing 1 constructors

Methods

Showing 9 methods

public void Break()

protected virtual Sandbox.Physics.PhysicsJoint CreateJoint(Sandbox.Physics.PhysicsPoint point1, Sandbox.Physics.PhysicsPoint point2)

Joint type implementation.

Implementations

protected virtual void DestroyJoint()

Implementations

protected virtual void DrawGizmos()

protected virtual void OnDestroy()

protected virtual void OnDisabled()

protected virtual void OnEnabled()

protected virtual void OnStart()

public void Unbreak()

Properties

Showing 19 properties

public Sandbox.GameObject Sandbox.Joint.AnchorBody { get; set; }

The body this joint is anchored to. If this is null then it will use the current GameObject as the anchor.

public float Sandbox.Joint.AngularStress { get; set; }

Current angular stress applied to the joint.

public Sandbox.Joint.AttachmentMode Sandbox.Joint.Attachment { get; set; }

Are local frames calculated automatically or set manually. See `Sandbox.Joint.LocalFrame1`, `Sandbox.Joint.LocalFrame2`

public Sandbox.GameObject Sandbox.Joint.Body { get; set; }

Game object to find the body to attach this joint to.

public Sandbox.PhysicsBody Sandbox.Joint.Body1 { get; set; }

The source physics body this joint is attached to.

public Sandbox.PhysicsBody Sandbox.Joint.Body2 { get; set; }

The target physics body this joint is constraining.

public float Sandbox.Joint.BreakForce { get; set; }

Strength of the linear constraint. If it takes any more energy than this, it'll break.

public float Sandbox.Joint.BreakTorque { get; set; }

Strength of the angular constraint. If it takes any more energy than this, it'll break.

public bool Sandbox.Joint.EnableCollision { get; set; }

Enable or disable collision between the two bodies.

public bool Sandbox.Joint.IsBroken { get; set; }

Is the joint currently broken and inactive.

public float Sandbox.Joint.LinearStress { get; set; }

Current linear stress applied to the joint.

public Transform Sandbox.Joint.LocalFrame1 { get; set; }

Only used on joint creation. See `Sandbox.Joint.AttachmentMode.LocalFrames`

public Transform Sandbox.Joint.LocalFrame2 { get; set; }

Only used on joint creation. See `Sandbox.Joint.AttachmentMode.LocalFrames`

public Sandbox.GameObject Sandbox.Joint.Object1 { get; set; }

The source GameObject we're connected to

public Sandbox.GameObject Sandbox.Joint.Object2 { get; set; }

The target GameObject we're connected to

public System.Action Sandbox.Joint.OnBreak { get; set; }

Called when the joint breaks.

public Sandbox.Physics.PhysicsPoint Sandbox.Joint.Point1 { get; set; }

A specific point this joint is attached at on `Sandbox.Joint.Body1`

public Sandbox.Physics.PhysicsPoint Sandbox.Joint.Point2 { get; set; }

A specific point this joint is attached at on `Sandbox.Joint.Body2`

public bool Sandbox.Joint.StartBroken { get; set; }

Is the joint broken on start.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Joint

On this page

Constructorsprotected Joint()Methodspublic System.Void Break()protected virtual Sandbox.Physics.PhysicsJoint CreateJoint(Sandbox.Physics.PhysicsPoint point1, Sandbox.Physics.PhysicsPoint point2)protected virtual System.Void DestroyJoint()protected virtual System.Void DrawGizmos()protected virtual System.Void OnDestroy()protected virtual System.Void OnDisabled()protected virtual System.Void OnEnabled()protected virtual System.Void OnStart()public System.Void Unbreak()Propertiespublic Sandbox.GameObject Sandbox.Joint.AnchorBody { get; set; }public System.Single Sandbox.Joint.AngularStress { get; set; }public Sandbox.Joint.AttachmentMode Sandbox.Joint.Attachment { get; set; }public Sandbox.GameObject Sandbox.Joint.Body { get; set; }public Sandbox.PhysicsBody Sandbox.Joint.Body1 { get; set; }public Sandbox.PhysicsBody Sandbox.Joint.Body2 { get; set; }public System.Single Sandbox.Joint.BreakForce { get; set; }public System.Single Sandbox.Joint.BreakTorque { get; set; }public System.Boolean Sandbox.Joint.EnableCollision { get; set; }public System.Boolean Sandbox.Joint.IsBroken { get; set; }public System.Single Sandbox.Joint.LinearStress { get; set; }public Transform Sandbox.Joint.LocalFrame1 { get; set; }public Transform Sandbox.Joint.LocalFrame2 { get; set; }public Sandbox.GameObject Sandbox.Joint.Object1 { get; set; }public Sandbox.GameObject Sandbox.Joint.Object2 { get; set; }public System.Action Sandbox.Joint.OnBreak { get; set; }public Sandbox.Physics.PhysicsPoint Sandbox.Joint.Point1 { get; set; }public Sandbox.Physics.PhysicsPoint Sandbox.Joint.Point2 { get; set; }public System.Boolean Sandbox.Joint.StartBroken { get; set; }Metadata