Table of Contents

Struct JointMotor2D

Namespace
Gravitas.Constraints
Assembly
Gravitas.dll

Deterministic scalar target-drive payload for a pure 2D joint.

public readonly struct JointMotor2D
Inherited Members

Properties

Damping

Gets damping applied against the solved relative scalar velocity.

public Fixed64 Damping { get; }

Property Value

Fixed64

Disabled

Gets a disabled motor payload.

public static JointMotor2D Disabled { get; }

Property Value

JointMotor2D

DriveStrength

Gets the deterministic spring-like drive strength.

public Fixed64 DriveStrength { get; }

Property Value

Fixed64

IsEnabled

Gets whether this motor can emit solver rows.

public bool IsEnabled { get; }

Property Value

bool

Kind

Gets the active motor family.

public JointMotorKind2D Kind { get; }

Property Value

JointMotorKind2D

MaximumMotorImpulse

Gets the maximum absolute impulse this motor may apply per row and iteration.

public Fixed64 MaximumMotorImpulse { get; }

Property Value

Fixed64

Target

Gets the target angle or slider translation for the active motor.

public Fixed64 Target { get; }

Property Value

Fixed64

Methods

Angular(Fixed64, Fixed64, Fixed64, Fixed64)

Creates an angular motor that drives scalar relative yaw toward targetAngle.

public static JointMotor2D Angular(Fixed64 targetAngle, Fixed64 driveStrength, Fixed64 damping, Fixed64 maximumMotorImpulse)

Parameters

targetAngle Fixed64
driveStrength Fixed64
damping Fixed64
maximumMotorImpulse Fixed64

Returns

JointMotor2D

Linear(Fixed64, Fixed64, Fixed64, Fixed64)

Creates a linear motor that drives prismatic translation toward targetTranslation.

public static JointMotor2D Linear(Fixed64 targetTranslation, Fixed64 driveStrength, Fixed64 damping, Fixed64 maximumMotorImpulse)

Parameters

targetTranslation Fixed64
driveStrength Fixed64
damping Fixed64
maximumMotorImpulse Fixed64

Returns

JointMotor2D