Namespace: b2d.joint
Language: Lua
Type: Defold Lua
File: script_box2d_joint_v2.cpp
Source: engine/gamesys/src/gamesys/scripts/box2d/v2/script_box2d_joint_v2.cpp
Functions for interacting with native Box2D joints.
Type: FUNCTION Create a distance joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, length, frequency, damping_ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a distance joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, length, min_length, max_length, enable_spring, hertz or frequency, damping_ratio, enable_limit, enable_motor, max_motor_force, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a filter joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition tableReturns
joint (b2Joint) - created jointType: FUNCTION Create a friction joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, max_force, max_torque, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a gear joint.
Parameters
joint1 (b2Joint) - first revolute or prismatic jointjoint2 (b2Joint) - second revolute or prismatic jointdefinition (table) - optional definition with ratioReturns
joint (b2Joint) - created jointType: FUNCTION Create a motor joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with linear_offset, angular_offset, max_force, max_torque, correction_factor, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a mouse joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with target, max_force, frequency, damping_ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a mouse joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with target, hertz or frequency, damping_ratio, max_force, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a prismatic joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, local_axis_a, reference_angle, enable_limit, lower_translation, upper_translation, enable_motor, max_motor_force, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a prismatic joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, local_axis_a, reference_angle, enable_spring, hertz or frequency, damping_ratio, enable_limit, lower_translation, upper_translation, enable_motor, max_motor_force, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a pulley joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with ground_anchor_a, ground_anchor_b, local_anchor_a, local_anchor_b, length_a, length_b, ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a revolute joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, reference_angle, enable_limit, lower_angle, upper_angle, enable_motor, max_motor_torque, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a revolute joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, reference_angle, enable_spring, hertz or frequency, damping_ratio, enable_limit, lower_angle, upper_angle, enable_motor, max_motor_torque, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a rope joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, max_length, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a weld joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, reference_angle, frequency, damping_ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a weld joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, reference_angle, linear_hertz, angular_hertz, linear_damping_ratio, angular_damping_ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a wheel joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, local_axis_a, enable_motor, max_motor_torque, motor_speed, frequency, damping_ratio, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Create a wheel joint.
Parameters
body_a (b2Body) - first bodybody_b (b2Body) - second bodydefinition (table) - optional definition with local_anchor_a, local_anchor_b, local_axis_a, enable_spring, hertz or frequency, damping_ratio, enable_limit, lower_translation, upper_translation, enable_motor, max_motor_torque, motor_speed, and collide_connectedReturns
joint (b2Joint) - created jointType: FUNCTION Destroy a joint created by b2d.joint.
Parameters
joint (b2Joint) - jointType: FUNCTION Destroy a joint created by b2d.joint.
Parameters
joint (b2Joint) - jointType: FUNCTION Enable or disable joint limits.
Parameters
joint (b2Joint) - prismatic or revolute jointenable (boolean) - true to enable limitsType: FUNCTION Enable or disable joint limits.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointenable (boolean) - true to enable limitsType: FUNCTION Enable or disable the joint motor.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointenable (boolean) - true to enable the motorType: FUNCTION Enable or disable the joint motor.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointenable (boolean) - true to enable the motorType: FUNCTION Enable or disable joint spring behavior.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointenable (boolean) - true to enable the springType: FUNCTION Get the world anchor on body A.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - world anchorType: FUNCTION Get the world anchor on body A.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - world anchorType: FUNCTION Get the world anchor on body B.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - world anchorType: FUNCTION Get the world anchor on body B.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - world anchorType: FUNCTION Get weld joint angular damping ratio.
Parameters
joint (b2Joint) - weld jointReturns
ratio (number) - damping ratioType: FUNCTION Get weld joint angular frequency.
Parameters
joint (b2Joint) - weld jointReturns
hertz (number) - frequency in hertzType: FUNCTION Get motor joint angular offset.
Parameters
joint (b2Joint) - motor jointReturns
offset (number) - angular offset in radiansType: FUNCTION Get the first body connected to a joint.
Parameters
joint (b2Joint) - jointReturns
body (b2Body) - body AType: FUNCTION Get the first body connected to a joint.
Parameters
joint (b2Joint) - jointReturns
body (b2Body) - body AType: FUNCTION Get the second body connected to a joint.
Parameters
joint (b2Joint) - jointReturns
body (b2Body) - body BType: FUNCTION Get the second body connected to a joint.
Parameters
joint (b2Joint) - jointReturns
body (b2Body) - body BType: FUNCTION Get whether connected bodies can collide.
Parameters
joint (b2Joint) - jointReturns
collide (boolean) - true if connected bodies can collideType: FUNCTION Get whether connected bodies can collide.
Parameters
joint (b2Joint) - jointReturns
collide (boolean) - true if connected bodies can collideType: FUNCTION Get motor joint correction factor.
Parameters
joint (b2Joint) - motor jointReturns
factor (number) - correction factorType: FUNCTION Get the current distance joint length.
Parameters
joint (b2Joint) - distance jointReturns
length (number) - current length in project unitsType: FUNCTION Get spring damping ratio.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointReturns
ratio (number) - damping ratioType: FUNCTION Alias for b2d.joint.get_spring_damping_ratio.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointReturns
ratio (number) - damping ratioType: FUNCTION Get spring frequency.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointReturns
frequency (number) - frequency in hertzType: FUNCTION Alias for b2d.joint.get_spring_hertz.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointReturns
frequency (number) - frequency in hertzType: FUNCTION Get pulley ground anchor A.
Parameters
joint (b2Joint) - pulley jointReturns
anchor (vector3) - world anchorType: FUNCTION Get pulley ground anchor B.
Parameters
joint (b2Joint) - pulley jointReturns
anchor (vector3) - world anchorType: FUNCTION Alias for b2d.joint.get_frequency.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointReturns
hertz (number) - frequency in hertzType: FUNCTION Alias for b2d.joint.get_spring_hertz.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointReturns
hertz (number) - frequency in hertzType: FUNCTION Get the first joint connected to a gear joint.
Parameters
joint (b2Joint) - gear jointReturns
joint1 (b2Joint) - first connected jointType: FUNCTION Get the second joint connected to a gear joint.
Parameters
joint (b2Joint) - gear jointReturns
joint2 (b2Joint) - second connected jointType: FUNCTION Get revolute joint angle.
Parameters
joint (b2Joint) - revolute jointReturns
angle (number) - angle in radiansType: FUNCTION Get revolute joint angle.
Parameters
joint (b2Joint) - revolute jointReturns
angle (number) - angle in radiansType: FUNCTION Get joint speed.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointReturns
speed (number) - joint speedType: FUNCTION Get joint speed.
Parameters
joint (b2Joint) - prismatic jointReturns
speed (number) - joint speedType: FUNCTION Get joint translation.
Parameters
joint (b2Joint) - prismatic or wheel jointReturns
translation (number) - translation in project unitsType: FUNCTION Get joint translation.
Parameters
joint (b2Joint) - prismatic jointReturns
translation (number) - translation in project unitsType: FUNCTION Get the distance joint length.
Parameters
joint (b2Joint) - distance jointReturns
length (number) - length in project unitsType: FUNCTION Get the distance joint length.
Parameters
joint (b2Joint) - distance jointReturns
length (number) - length in project unitsType: FUNCTION Get pulley segment length A.
Parameters
joint (b2Joint) - pulley jointReturns
length (number) - length in project unitsType: FUNCTION Get pulley segment length B.
Parameters
joint (b2Joint) - pulley jointReturns
length (number) - length in project unitsType: FUNCTION Get rope limit state.
Parameters
joint (b2Joint) - rope jointReturns
state (number) - one of the LIMIT_STATE_* constantsType: FUNCTION Get weld joint linear damping ratio.
Parameters
joint (b2Joint) - weld jointReturns
ratio (number) - damping ratioType: FUNCTION Get weld joint linear frequency.
Parameters
joint (b2Joint) - weld jointReturns
hertz (number) - frequency in hertzType: FUNCTION Get motor joint linear offset.
Parameters
joint (b2Joint) - motor jointReturns
offset (vector3) - linear offset in project unitsType: FUNCTION Get the local anchor on body A.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - local anchorType: FUNCTION Get the local anchor on body A.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - local anchorType: FUNCTION Get the local anchor on body B.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - local anchorType: FUNCTION Get the local anchor on body B.
Parameters
joint (b2Joint) - jointReturns
anchor (vector3) - local anchorType: FUNCTION Get the local axis on body A.
Parameters
joint (b2Joint) - prismatic or wheel jointReturns
axis (vector3) - local axisType: FUNCTION Get the lower joint limit.
Parameters
joint (b2Joint) - prismatic or revolute jointReturns
lower (number) - lower limitType: FUNCTION Get the lower joint limit.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointReturns
lower (number) - lower limitType: FUNCTION Get maximum force.
Parameters
joint (b2Joint) - mouse or friction jointReturns
force (number) - maximum forceType: FUNCTION Get maximum force.
Parameters
joint (b2Joint) - mouse or motor jointReturns
force (number) - maximum forceType: FUNCTION Get rope maximum length.
Parameters
joint (b2Joint) - rope jointReturns
length (number) - maximum length in project unitsType: FUNCTION Get the distance joint maximum length.
Parameters
joint (b2Joint) - distance jointReturns
length (number) - maximum length in project unitsType: FUNCTION Get maximum motor force.
Parameters
joint (b2Joint) - prismatic jointReturns
force (number) - maximum motor forceType: FUNCTION Get maximum motor force.
Parameters
joint (b2Joint) - distance or prismatic jointReturns
force (number) - maximum motor forceType: FUNCTION Get maximum motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointReturns
torque (number) - maximum motor torqueType: FUNCTION Get maximum motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointReturns
torque (number) - maximum motor torqueType: FUNCTION Get maximum torque.
Parameters
joint (b2Joint) - friction jointReturns
torque (number) - maximum torqueType: FUNCTION Get maximum torque.
Parameters
joint (b2Joint) - motor jointReturns
torque (number) - maximum torqueType: FUNCTION Get the distance joint minimum length.
Parameters
joint (b2Joint) - distance jointReturns
length (number) - minimum length in project unitsType: FUNCTION Get current motor force.
Parameters
joint (b2Joint) - prismatic jointinv_dt (number) - inverse time stepReturns
force (number) - motor forceType: FUNCTION Get current motor force.
Parameters
joint (b2Joint) - distance or prismatic jointReturns
force (number) - motor forceType: FUNCTION Get motor speed.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointReturns
speed (number) - motor speedType: FUNCTION Get motor speed.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointReturns
speed (number) - motor speedType: FUNCTION Get current motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointinv_dt (number) - inverse time stepReturns
torque (number) - motor torqueType: FUNCTION Get current motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointReturns
torque (number) - motor torqueType: FUNCTION Get the target for a mouse joint.
Parameters
joint (b2Joint) - mouse jointReturns
target (vector3) - world targetType: FUNCTION Get the target for a mouse joint.
Parameters
joint (b2Joint) - mouse jointReturns
target (vector3) - world targetType: FUNCTION Get joint ratio.
Parameters
joint (b2Joint) - pulley or gear jointReturns
ratio (number) - joint ratioType: FUNCTION Get reaction force.
Parameters
joint (b2Joint) - jointinv_dt (number) - inverse time stepReturns
force (vector3) - reaction forceType: FUNCTION Get reaction force.
Parameters
joint (b2Joint) - jointReturns
force (vector3) - reaction forceType: FUNCTION Get reaction torque.
Parameters
joint (b2Joint) - jointinv_dt (number) - inverse time stepReturns
torque (number) - reaction torqueType: FUNCTION Get reaction torque.
Parameters
joint (b2Joint) - jointReturns
torque (number) - reaction torqueType: FUNCTION Get the reference angle.
Parameters
joint (b2Joint) - prismatic, revolute, or weld jointReturns
angle (number) - reference angle in radiansType: FUNCTION Get weld joint reference angle.
Parameters
joint (b2Joint) - weld jointReturns
angle (number) - reference angle in radiansType: FUNCTION Alias for b2d.joint.get_damping_ratio.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointReturns
ratio (number) - damping ratioType: FUNCTION Get spring damping ratio.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointReturns
ratio (number) - damping ratioType: FUNCTION Get spring frequency.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointReturns
hertz (number) - frequency in hertzType: FUNCTION Get the joint type.
Parameters
joint (b2Joint) - jointReturns
type (number) - one of the JOINT_TYPE_* constantsType: FUNCTION Get the joint type.
Parameters
joint (b2Joint) - jointReturns
type (number) - one of the JOINT_TYPE_* constantsType: FUNCTION Get the upper joint limit.
Parameters
joint (b2Joint) - prismatic or revolute jointReturns
upper (number) - upper limitType: FUNCTION Get the upper joint limit.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointReturns
upper (number) - upper limitType: FUNCTION Get the world owning a joint.
Parameters
joint (b2Joint) - jointReturns
world (b2World) - owning worldType: FUNCTION Get whether the joint is active.
Parameters
joint (b2Joint) - jointReturns
active (boolean) - true if the joint is activeType: FUNCTION Get whether joint limits are enabled.
Parameters
joint (b2Joint) - prismatic or revolute jointReturns
enabled (boolean) - true if limits are enabledType: FUNCTION Get whether joint limits are enabled.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointReturns
enabled (boolean) - true if limits are enabledType: FUNCTION Get whether the joint motor is enabled.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointReturns
enabled (boolean) - true if the motor is enabledType: FUNCTION Get whether the joint motor is enabled.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointReturns
enabled (boolean) - true if the motor is enabledType: FUNCTION Get whether joint spring behavior is enabled.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointReturns
enabled (boolean) - true if the spring is enabledType: FUNCTION Validate a joint handle.
Parameters
joint (b2Joint) - jointReturns
valid (boolean) - true if the joint handle still refers to a live Box2D jointType: CONSTANT Distance joint type.
Type: CONSTANT Distance joint type.
Type: CONSTANT Filter joint type.
Type: CONSTANT Friction joint type.
Type: CONSTANT Gear joint type.
Type: CONSTANT Motor joint type.
Type: CONSTANT Mouse joint type.
Type: CONSTANT Mouse joint type.
Type: CONSTANT Prismatic joint type.
Type: CONSTANT Prismatic joint type.
Type: CONSTANT Pulley joint type.
Type: CONSTANT Revolute joint type.
Type: CONSTANT Revolute joint type.
Type: CONSTANT Rope joint type.
Type: CONSTANT Unknown joint type.
Type: CONSTANT Weld joint type.
Type: CONSTANT Weld joint type.
Type: CONSTANT Wheel joint type.
Type: CONSTANT Wheel joint type.
Type: CONSTANT At lower limit state.
Type: CONSTANT At upper limit state.
Type: CONSTANT Equal limits state.
Type: CONSTANT Inactive limit state.
Type: FUNCTION Set weld joint angular damping ratio.
Parameters
joint (b2Joint) - weld jointratio (number) - damping ratioType: FUNCTION Set weld joint angular frequency.
Parameters
joint (b2Joint) - weld jointhertz (number) - frequency in hertzType: FUNCTION Set motor joint angular offset.
Parameters
joint (b2Joint) - motor jointoffset (number) - angular offset in radiansType: FUNCTION Set whether connected bodies can collide.
Parameters
joint (b2Joint) - jointcollide (boolean) - true if connected bodies can collideType: FUNCTION Set motor joint correction factor.
Parameters
joint (b2Joint) - motor jointfactor (number) - correction factorType: FUNCTION Set spring damping ratio.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointratio (number) - damping ratioType: FUNCTION Alias for b2d.joint.set_spring_damping_ratio.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointratio (number) - damping ratioType: FUNCTION Set spring frequency.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointfrequency (number) - frequency in hertzType: FUNCTION Alias for b2d.joint.set_spring_hertz.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointfrequency (number) - frequency in hertzType: FUNCTION Alias for b2d.joint.set_frequency.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointhertz (number) - frequency in hertzType: FUNCTION Alias for b2d.joint.set_spring_hertz.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointhertz (number) - frequency in hertzType: FUNCTION Set the distance joint length.
Parameters
joint (b2Joint) - distance jointlength (number) - length in project unitsType: FUNCTION Set the distance joint length.
Parameters
joint (b2Joint) - distance jointlength (number) - length in project unitsType: FUNCTION Set the distance joint length range.
Parameters
joint (b2Joint) - distance jointmin_length (number) - minimum length in project unitsmax_length (number) - maximum length in project unitsType: FUNCTION Set joint limits.
Parameters
joint (b2Joint) - prismatic or revolute jointlower (number) - lower limitupper (number) - upper limitType: FUNCTION Set joint limits.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointlower (number) - lower limitupper (number) - upper limitType: FUNCTION Set weld joint linear damping ratio.
Parameters
joint (b2Joint) - weld jointratio (number) - damping ratioType: FUNCTION Set weld joint linear frequency.
Parameters
joint (b2Joint) - weld jointhertz (number) - frequency in hertzType: FUNCTION Set motor joint linear offset.
Parameters
joint (b2Joint) - motor jointoffset (vector3) - linear offset in project unitsType: FUNCTION Set maximum force.
Parameters
joint (b2Joint) - mouse or friction jointforce (number) - maximum forceType: FUNCTION Set maximum force.
Parameters
joint (b2Joint) - mouse or motor jointforce (number) - maximum forceType: FUNCTION Set rope maximum length.
Parameters
joint (b2Joint) - rope jointlength (number) - maximum length in project unitsType: FUNCTION Set the distance joint maximum length.
Parameters
joint (b2Joint) - distance jointlength (number) - maximum length in project unitsType: FUNCTION Set maximum motor force.
Parameters
joint (b2Joint) - prismatic jointforce (number) - maximum motor forceType: FUNCTION Set maximum motor force.
Parameters
joint (b2Joint) - distance or prismatic jointforce (number) - maximum motor forceType: FUNCTION Set maximum motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointtorque (number) - maximum motor torqueType: FUNCTION Set maximum motor torque.
Parameters
joint (b2Joint) - revolute or wheel jointtorque (number) - maximum motor torqueType: FUNCTION Set maximum torque.
Parameters
joint (b2Joint) - friction jointtorque (number) - maximum torqueType: FUNCTION Set maximum torque.
Parameters
joint (b2Joint) - motor jointtorque (number) - maximum torqueType: FUNCTION Set the distance joint minimum length.
Parameters
joint (b2Joint) - distance jointlength (number) - minimum length in project unitsType: FUNCTION Set motor speed.
Parameters
joint (b2Joint) - prismatic, revolute, or wheel jointspeed (number) - motor speedType: FUNCTION Set motor speed.
Parameters
joint (b2Joint) - distance, prismatic, revolute, or wheel jointspeed (number) - motor speedType: FUNCTION Set the target for a mouse joint.
Parameters
joint (b2Joint) - mouse jointtarget (vector3) - world targetType: FUNCTION Set the target for a mouse joint.
Parameters
joint (b2Joint) - mouse jointtarget (vector3) - world targetType: FUNCTION Set gear joint ratio.
Parameters
joint (b2Joint) - gear jointratio (number) - gear ratioType: FUNCTION Set weld joint reference angle.
Parameters
joint (b2Joint) - weld jointangle (number) - reference angle in radiansType: FUNCTION Alias for b2d.joint.set_damping_ratio.
Parameters
joint (b2Joint) - distance, mouse, weld, or wheel jointratio (number) - damping ratioType: FUNCTION Set spring damping ratio.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointratio (number) - damping ratioType: FUNCTION Set spring frequency.
Parameters
joint (b2Joint) - distance, mouse, prismatic, revolute, or wheel jointhertz (number) - frequency in hertzType: FUNCTION Wake the bodies connected to a joint.
Parameters
joint (b2Joint) - jointType: TYPEDEF Box2D joint
Parameters
value (userdata)Type: TYPEDEF Box2D joint
Parameters
value (userdata)