WheelJoint2D class

A wheel on a suspension along axis.

Inheritance

Constructors

WheelJoint2D({EntityTarget connectedBody = EntityTarget.none, Offset anchor = Offset.zero, Offset connectedAnchor = Offset.zero, bool collideConnected = false, bool enabled = true, Offset axis = const Offset(0, 1), double stiffness = 45.0, double damping = 0.65, bool enableMotor = true, double motorSpeed = 12.0, double motorMaxTorque = 250.0})
A wheel joint.

Properties

anchor ↔ Offset
Where on this entity the joint holds, in its own space.
getter/setter pairinherited
axis ↔ Offset
The suspension's axis, in this entity's space.
getter/setter pair
collideConnected ↔ bool
Whether the two bodies still collide with each other.
getter/setter pairinherited
componentType → Type
Type identifier for this component
no setterinherited
connectedAnchor ↔ Offset
Where on the other entity it holds, in that entity's space.
getter/setter pairinherited
connectedBody ↔ EntityTarget
The other body's entity — by name or by tag.
getter/setter pairinherited
damping ↔ double
How much the suspension's swing is damped: a damping ratio, 0 bouncing on, 1 settling without overshoot.
getter/setter pair
enabled ↔ bool
Whether the joint acts.
getter/setter pairinherited
enableMotor ↔ bool
Whether a motor turns the wheel at motorSpeed.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
motorMaxTorque ↔ double
The most torque the motor uses.
getter/setter pair
motorSpeed ↔ double
The motor's speed, radians per second.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stiffness ↔ double
How stiff the suspension is: how fast it springs back, in hertz. 0 is no spring.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach(EntityId entityId) → void
Called when this component is added to an entity.
inherited
onDetach(EntityId entityId) → void
Called when this component is removed from an entity.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited