API ReferenceSandbox.Physics

PhysicsJointclass

A physics constraint.

objectPhysicsJoint
Namespace
Sandbox.Physics
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Physics.PhysicsJoint

Methods14

Showing 14 methods

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

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

ParameterTypeDescription
aPhysicsPoint
bPhysicsPoint
maxLengthfloat
Returns:SpringJoint

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

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

ParameterTypeDescription
aPhysicsPoint
bPhysicsPoint
minLengthfloat
maxLengthfloat
Returns:SpringJoint

public void Remove()PUBLIC

Removes this joint.

Returns:void

Properties9

Showing 9 properties

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

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

Returns:float

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

Enables or disables collisions between the 2 constrained physics bodies.

Returns:bool

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

Obsolete: This API member is obsolete.

Returns:bool

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

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

Returns:PhysicsPoint

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

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

Returns:PhysicsPoint

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

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

Returns:float

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