Scripting API
Scripting API
WheelJoint2D
Struct in Abyss.Physics2D, from Abyss.Physics2D.
A wheel on a body: WheelJoint2D.ConnectedBody, the wheel, turning freely about WheelJoint2D.ConnectedAnchor and held to the body this is on — the car — by a suspension along a line, a spring of WheelJoint2D.SuspensionFrequency and WheelJoint2D.SuspensionDampingRatio. Its motor turns the wheel.
public struct WheelJoint2DRemarks
The suspension is at WheelJoint2D.SuspensionAngle degrees in the world as the joint is made, 90 straight up, and turns with the car after. Anchors and breaking as HingeJoint2D's; with no wheel, it holds the car to the world.
Fields
ConnectedBody
public EntityRef ConnectedBodyThe wheel: an entity with a Rigidbody 2D, or under one; none for the world.
EnableCollision
public bool EnableCollisionWhether the two bodies still meet each other.
AutoConfigureConnectedAnchor
public bool AutoConfigureConnectedAnchorWhether the connected anchor is made where the anchor is as the joint is made.
Anchor
public Vector2 AnchorWhere it holds this body, in its entity's own units.
ConnectedAnchor
public Vector2 ConnectedAnchorWhere it holds the wheel, in its entity's own units, or in the world's where there is none.
SuspensionDampingRatio
public float SuspensionDampingRatioHow the suspension's spring is slowed: 0 not at all, 1 at once.
SuspensionFrequency
public float SuspensionFrequencyHow stiff the suspension's spring is, in times a second it bounces.
SuspensionAngle
public float SuspensionAngleWhich way the suspension moves, in degrees anticlockwise from the world's X as it is made.
UseMotor
public bool UseMotorWhether the motor turns the wheel.
MotorSpeed
public float MotorSpeedHow fast the motor turns the wheel against the car, in degrees a second, anticlockwise.
MaxMotorTorque
public float MaxMotorTorqueThe most torque the motor turns it with, in newton meters.
BreakForce
public float BreakForceThe force it breaks at, in newtons; infinity never.
BreakTorque
public float BreakTorqueThe torque it breaks at, in newton meters; infinity never.
