s&box docs
API ReferenceSandbox.Physics

public class Sandbox.Physics.PhysicsJoint

A physics constraint.

Methods

Showing 14 methods

public static Sandbox.Physics.ControlJoint CreateControl(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)

public static Sandbox.Physics.FixedJoint CreateFixed(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)

Creates an almost solid constraint between two physics bodies.

public static Sandbox.Physics.SpringJoint CreateLength(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b, float maxLength)

Creates a constraint like a rope, where it has no minimum length but its max length is restrained.

public static Sandbox.Physics.SpringJoint CreateSpring(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b, float minLength, float maxLength)

Creates a constraint that will try to stay the same length, like a spring, or a rod.

public static Sandbox.Physics.UprightJoint CreateUpright(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)

public void Remove()

Removes this joint.

Properties

Showing 9 properties

public float Sandbox.Physics.PhysicsJoint.AngularStrength { get; set; }

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

public Sandbox.PhysicsBody Sandbox.Physics.PhysicsJoint.Body1 { get; set; }

The source physics body this joint is attached to.

public Sandbox.PhysicsBody Sandbox.Physics.PhysicsJoint.Body2 { get; set; }

The target physics body this joint is constraining.

public bool Sandbox.Physics.PhysicsJoint.Collisions { get; set; }

Enables or disables collisions between the 2 constrained physics bodies.

public bool Sandbox.Physics.PhysicsJoint.IsActive { get; set; }Obsolete

Obsolete: This API member is obsolete.

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

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

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

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

public float Sandbox.Physics.PhysicsJoint.Strength { get; set; }

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

public Sandbox.PhysicsWorld Sandbox.Physics.PhysicsJoint.World { get; set; }

The `Sandbox.PhysicsWorld` this joint belongs to.

Metadata

FieldValue
NamespaceSandbox.Physics
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Physics.PhysicsJoint

On this page

Methodspublic static Sandbox.Physics.BallSocketJoint CreateBallSocket(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)public static Sandbox.Physics.BallSocketJoint CreateBallSocket(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Vector3 origin)public static Sandbox.Physics.ControlJoint CreateControl(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)public static Sandbox.Physics.FixedJoint CreateFixed(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)public static Sandbox.Physics.HingeJoint CreateHinge(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)public static Sandbox.Physics.HingeJoint CreateHinge(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Transform localFrame1, Transform localFrame2)public static Sandbox.Physics.HingeJoint CreateHinge(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Vector3 center, Vector3 axis)public static Sandbox.Physics.SpringJoint CreateLength(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b, System.Single maxLength)public static Sandbox.Physics.PulleyJoint CreatePulley(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Vector3 anchor1, Vector3 ground1, Vector3 anchor2, Vector3 ground2)public static Sandbox.Physics.SliderJoint CreateSlider(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b, System.Single minLength, System.Single maxLength)public static Sandbox.Physics.SliderJoint CreateSlider(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Vector3 origin1, Vector3 origin2, Vector3 axis, System.Single minLength, System.Single maxLength)public static Sandbox.Physics.SpringJoint CreateSpring(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b, System.Single minLength, System.Single maxLength)public static Sandbox.Physics.UprightJoint CreateUpright(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)public System.Void Remove()Propertiespublic System.Single Sandbox.Physics.PhysicsJoint.AngularStrength { get; set; }public Sandbox.PhysicsBody Sandbox.Physics.PhysicsJoint.Body1 { get; set; }public Sandbox.PhysicsBody Sandbox.Physics.PhysicsJoint.Body2 { get; set; }public System.Boolean Sandbox.Physics.PhysicsJoint.Collisions { get; set; }public System.Boolean Sandbox.Physics.PhysicsJoint.IsActive { get; set; }public Sandbox.Physics.PhysicsPoint Sandbox.Physics.PhysicsJoint.Point1 { get; set; }public Sandbox.Physics.PhysicsPoint Sandbox.Physics.PhysicsJoint.Point2 { get; set; }public System.Single Sandbox.Physics.PhysicsJoint.Strength { get; set; }public Sandbox.PhysicsWorld Sandbox.Physics.PhysicsJoint.World { get; set; }Metadata