Table of Contents

Struct RevoluteJointDefinition

Namespace
Box3D
Assembly
Box3D.NET.dll

Creates a hinge: body B may rotate about the z axis of the joint frame, and nothing else.

public readonly record struct RevoluteJointDefinition : IEquatable<RevoluteJointDefinition>

Implements

Inherited Members

Examples

var def = RevoluteJointDefinition.Hinge(frame, door, hingePoint, Vector3.UnitY) with
{
    LimitsEnabled = true,
    LowerAngle = 0.0f,
    UpperAngle = MathF.PI * 0.5f,   // opens ninety degrees
    MotorEnabled = true,
    MotorSpeed = 1.5f,
    MaxMotorTorque = 20.0f,          // a door closer
};

RevoluteJoint hinge = world.CreateRevoluteJoint(def);

Properties

Base

Gets the settings shared by every joint.

DampingRatio

Gets the spring damping ratio, where one is critical damping.

Default

Gets the engine defaults, with no bodies attached.

Hertz

Gets the spring stiffness in cycles per second.

LimitsEnabled

Gets a value indicating whether the angle limits are enforced.

LowerAngle

Gets the lower angle limit in radians. At least minus 0.99 pi.

MaxMotorTorque

Gets the maximum torque the motor may apply, in newton-metres.

MotorEnabled

Gets a value indicating whether the motor is enabled.

MotorSpeed

Gets the speed the motor drives towards, in radians per second.

SpringEnabled

Gets a value indicating whether the angular spring is enabled.

TargetAngle

Gets the angle treated as zero by the limits, in radians.

UpperAngle

Gets the upper angle limit in radians. At most 0.99 pi.

Methods

Hinge(Body, Body, Vector3, Vector3)

Creates a hinge between two bodies about a world-space axis.