Struct WheelJointDefinition
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
A wheel with suspension, a spin motor and optional steering.
public readonly record struct WheelJointDefinition : IEquatable<WheelJointDefinition>Implements
Inherited Members
Examples
var wheel = WheelJointDefinition.Suspension(chassis, tyre, hubPoint, Vector3.UnitY) with
{
SuspensionEnabled = true,
SuspensionHertz = 5.0f,
SuspensionDampingRatio = 0.7f,
SuspensionLimitEnabled = true,
LowerSuspensionLimit = -0.25f,
UpperSuspensionLimit = 0.1f,
SpinMotorEnabled = true,
MaxSpinTorque = 400.0f,
};
Remarks
Body A is the chassis and body B is the wheel. The suspension travels along the frame A x axis; the wheel spins about the frame B z axis.
Properties
- Base
-
Gets the settings shared by every joint.
- Default
-
Gets the engine defaults, with no bodies attached.
- LowerSteeringLimit
-
Gets the lower steering limit in radians.
- LowerSuspensionLimit
-
Gets the lower suspension travel limit.
- MaxSpinTorque
-
Gets the maximum torque the spin motor may apply, in newton-metres.
- MaxSteeringTorque
-
Gets the maximum steering torque, in newton-metres.
- SpinMotorEnabled
-
Gets a value indicating whether the spin motor is enabled.
- SpinSpeed
-
Gets the spin speed the motor drives towards, in radians per second.
- SteeringDampingRatio
-
Gets the steering damping ratio.
- SteeringEnabled
-
Gets a value indicating whether the wheel may steer.
- SteeringHertz
-
Gets the steering stiffness in cycles per second.
- SteeringLimitEnabled
-
Gets a value indicating whether the steering angle is limited.
- SuspensionDampingRatio
-
Gets the suspension damping ratio.
- SuspensionEnabled
-
Gets a value indicating whether the suspension spring is enabled.
- SuspensionHertz
-
Gets the suspension stiffness in cycles per second.
- SuspensionLimitEnabled
-
Gets a value indicating whether the suspension travel is limited.
- TargetSteeringAngle
-
Gets the steering angle driven towards, in radians.
- UpperSteeringLimit
-
Gets the upper steering limit in radians.
- UpperSuspensionLimit
-
Gets the upper suspension travel limit.
Methods
- Suspension(Body, Body, Vector3, Vector3)
-
Mounts a wheel on a chassis.