PhysicsJointclass
A physics constraint.
Methods14
Showing 14 methods
public static Sandbox.Physics.ControlJoint CreateControl(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)
| Parameter | Type | Description |
|---|---|---|
| a | PhysicsPoint | — |
| b | PhysicsPoint | — |
public static Sandbox.Physics.FixedJoint CreateFixed(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)
Creates an almost solid constraint between two physics bodies.
| Parameter | Type | Description |
|---|---|---|
| a | PhysicsPoint | — |
| b | PhysicsPoint | — |
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.
| Parameter | Type | Description |
|---|---|---|
| a | PhysicsPoint | — |
| b | PhysicsPoint | — |
| maxLength | float | — |
public static Sandbox.Physics.PulleyJoint CreatePulley(Sandbox.PhysicsBody body1, Sandbox.PhysicsBody body2, Vector3 anchor1, Vector3 ground1, Vector3 anchor2, Vector3 ground2)
Obsolete: This API member is obsolete.
| Parameter | Type | Description |
|---|---|---|
| body1 | PhysicsBody | — |
| body2 | PhysicsBody | — |
| anchor1 | Vector3 | — |
| ground1 | Vector3 | — |
| anchor2 | Vector3 | — |
| ground2 | Vector3 | — |
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.
| Parameter | Type | Description |
|---|---|---|
| a | PhysicsPoint | — |
| b | PhysicsPoint | — |
| minLength | float | — |
| maxLength | float | — |
public static Sandbox.Physics.UprightJoint CreateUpright(Sandbox.Physics.PhysicsPoint a, Sandbox.Physics.PhysicsPoint b)
| Parameter | Type | Description |
|---|---|---|
| a | PhysicsPoint | — |
| b | PhysicsPoint | — |
public void Remove()
Removes this joint.
void—No results match this filter.
Properties9
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.
float—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.
bool—public bool Sandbox.Physics.PhysicsJoint.IsActive { get; set; }
Obsolete: This API member is obsolete.
bool—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.
float—public Sandbox.PhysicsWorld Sandbox.Physics.PhysicsJoint.World { get; set; }
The `Sandbox.PhysicsWorld` this joint belongs to.
No results match this filter.