GenericJoint class abstract Physics

A fully configurable six-degree-of-freedom joint.

The joint defines a local reference frame on each body (localAnchorA / localBasisA and localAnchorB / localBasisB); the six axes are expressed in that frame. Each axis is independently locked, free, or limited and may carry a spring-damper JointMotor. This is the most general joint: the fixed, spherical, revolute, and prismatic joints are all special cases. Pass a null otherNode to anchor to the world.

Inheritance

Constructors

GenericJoint()

Properties

collisionsEnabled bool
When false, the two bodies connected by this joint do not collide with each other (typical for ragdoll joints).
getter/setter pairinherited
enabled bool
Whether this component's update hook runs each frame.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isAttached bool
Whether this component is currently attached to a node.
no setterinherited
isLoaded bool
Whether onLoad has completed.
no setterinherited
isMounted bool
Whether the owning node is part of a live scene graph.
no setterinherited
localAnchorA ↔ Vector3
getter/setter pair
localAnchorB ↔ Vector3
getter/setter pair
localBasisA ↔ Quaternion
Orientation of the joint's reference frame on this node's body.
getter/setter pair
localBasisB ↔ Quaternion
Orientation of the joint's reference frame on the other body.
getter/setter pair
node Node
The node this component is attached to.
no setterinherited
otherNode Node?
The other node this joint connects to. When null, the joint anchors to the world (the other side behaves as a fixed body).
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

configForAxis(JointAxis axis) JointAxisConfig
The current configuration of axis.
fixedUpdate(double fixedDt) → void
Called once per fixed physics step while the component is mounted, enabled, and loaded. fixedDt is the fixed timestep of the surrounding PhysicsWorld, not the frame interval.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach() → void
Called when this component is added to a node.
inherited
onDetach() → void
Called when this component is removed from a node.
inherited
onLoad() Future<void>
Optional asynchronous setup, such as loading an asset.
inherited
onMount() → void
Called when the owning node enters a live scene graph.
inherited
onUnmount() → void
Called when the owning node leaves a live scene graph.
inherited
setAxisConfig(JointAxis axis, JointAxisConfig config) → void
Replaces the configuration of axis. Takes effect immediately while the joint is mounted.
toString() String
A string representation of this object.
inherited
update(double deltaSeconds) → void
Called once per frame while the component is mounted, enabled, and loaded. deltaSeconds is the elapsed time since the previous tick.
inherited

Operators

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