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
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
Kind
Gets the active motor family.
public JointMotorKind2D Kind { get; }
Property Value
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
targetAngleFixed64driveStrengthFixed64dampingFixed64maximumMotorImpulseFixed64
Returns
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
targetTranslationFixed64driveStrengthFixed64dampingFixed64maximumMotorImpulseFixed64