API ReferenceSandbox.Physics

ControlJointclass

The control joint is designed to control the movement of a body while remaining responsive to collisions. A spring can be used to control position and rotation, while a velocity motor can control velocity and simulate friction in top-down games. Both methods can be combined — for example, a spring with friction. Position and velocity control each have configurable force and torque limits.

objectPhysicsJointControlJoint
Namespace
Sandbox.Physics
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Physics.ControlJoint : Sandbox.Physics.PhysicsJoint

Properties6

Showing 6 properties

public Sandbox.Physics.PhysicsSpring Sandbox.Physics.ControlJoint.AngularSpring { get; set; }PUBLICGETSET

The spring angular hertz stiffness and damping ratio.

Returns:PhysicsSpring

public Vector3 Sandbox.Physics.ControlJoint.AngularVelocity { get; set; }PUBLICGETSET

The desired relative angular velocity in radians per second.

Returns:Vector3

public Sandbox.Physics.PhysicsSpring Sandbox.Physics.ControlJoint.LinearSpring { get; set; }PUBLICGETSET

The spring linear hertz stiffness and damping ratio.

Returns:PhysicsSpring

public Vector3 Sandbox.Physics.ControlJoint.LinearVelocity { get; set; }PUBLICGETSET

The desired relative linear velocity.

Returns:Vector3

public float Sandbox.Physics.ControlJoint.MaxVelocityForce { get; set; }PUBLICGETSET

The joint maximum force.

Returns:float

public float Sandbox.Physics.ControlJoint.MaxVelocityTorque { get; set; }PUBLICGETSET

The joint maximum torque.

Returns:float

On this page