Jointclass

objectComponentJoint
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public abstract class Sandbox.Joint : Sandbox.Component

Constructors1

Showing 1 constructors

protected Joint()PROTECTEDCONSTRUCTOR

Methods9

Showing 9 methods

public void Break()PUBLIC

Returns:void

protected virtual void DestroyJoint()PROTECTEDVIRTUAL

Returns:void

protected virtual void DrawGizmos()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnDestroy()PROTECTEDVIRTUALLIFECYCLE

Returns:void

protected virtual void OnDisabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void

protected virtual void OnEnabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void

protected virtual void OnStart()PROTECTEDVIRTUALLIFECYCLE

Returns:void

public void Unbreak()PUBLIC

Returns:void

Properties19

Showing 19 properties

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

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

Returns:GameObject

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

Current angular stress applied to the joint.

Returns:float

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

The source physics body this joint is attached to.

Returns:PhysicsBody

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

The target physics body this joint is constraining.

Returns:PhysicsBody

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

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

Returns:float

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

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

Returns:float

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

Enable or disable collision between the two bodies.

Returns:bool

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

Is the joint currently broken and inactive.

Returns:bool

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

Current linear stress applied to the joint.

Returns:float

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

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

Returns:Transform

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

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

Returns:Transform

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

The source GameObject we're connected to

Returns:GameObject

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

The target GameObject we're connected to

Returns:GameObject

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

Called when the joint breaks.

Returns:Action

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

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

Returns:PhysicsPoint

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

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

Returns:PhysicsPoint

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

Is the joint broken on start.

Returns:bool

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