Table of Contents

Struct PrismaticJointDefinition

Namespace
Box3D
Assembly
Box3D.NET.dll

Creates a slider: body B translates along the x axis of the joint frame and cannot rotate relative to body A.

public readonly record struct PrismaticJointDefinition : IEquatable<PrismaticJointDefinition>

Implements

Inherited Members

Examples

// A lift that travels four metres straight up, driven by a motor.
var def = PrismaticJointDefinition.Slider(shaft, platform, basePoint, Vector3.UnitY) with
{
    LimitsEnabled = true,
    LowerTranslation = 0.0f,
    UpperTranslation = 4.0f,
    MotorEnabled = true,
    MotorSpeed = 1.0f,
    MaxMotorForce = 5000.0f,
};

Properties

Base

Gets the settings shared by every joint.

DampingRatio

Gets the spring damping ratio.

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 translation limits are enforced.

LowerTranslation

Gets the lower translation limit.

MaxMotorForce

Gets the maximum force the motor may apply, in newtons.

MotorEnabled

Gets a value indicating whether the motor is enabled.

MotorSpeed

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

SpringEnabled

Gets a value indicating whether the spring along the slide axis is enabled.

TargetTranslation

Gets the translation the spring drives towards, in metres.

UpperTranslation

Gets the upper translation limit.

Methods

Slider(Body, Body, Vector3, Vector3)

Creates a slider between two bodies along a world-space direction.