physics.MotorJoint
pykraken.physics.MotorJoint A joint that drives two bodies toward a target relative linear and angular offset.
More about physics.MotorJoint
The motor joint applies forces and torques to maintain the specified offsets. Useful for animating bodies to follow paths or track positions while still interacting with the physics simulation.
Inherits Joint
At a glance
13 membersReference
PYTHON APIConstructor
methodphysics.MotorJoint(/, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.
angular_offset
propertyangular_offset: floatThe target angular offset in radians.
body_a
propertybody_a: physics.BodyThe first body attached to the joint.
body_b
propertybody_b: physics.BodyThe second body attached to the joint.
collide_connected
propertycollide_connected: boolWhether the connected bodies should collide with each other.
correction_factor
propertycorrection_factor: floatThe position correction factor in [0, 1].
is_valid
propertyis_valid: boolIndicates whether the joint is not destroyed.
linear_offset
propertylinear_offset: Vec2The target linear offset from body A to body B.
local_anchor_a
propertylocal_anchor_a: Vec2The local anchor point relative to body A's origin.
local_anchor_b
propertylocal_anchor_b: Vec2The local anchor point relative to body B's origin.
max_force
propertymax_force: floatThe maximum motor force.
max_torque
propertymax_torque: floatThe maximum motor torque.
destroy
methoddestroy(self) -> NoneDestroy the joint manually.