This function set a particular joint property to the specified value.


GML Code Example

physics_joint_set_value(joint, field, value)

Argument Description
joint The index of the joint that you wish to change
field The constant for the joint property that you wish to change
value The new value for the joint property

Returns: N/A


Certain joint properties can be changed and set even after the creation of the joint, but only on those joints that have a motor, ie - revolute joints and prismatic joints. There are a number of constants that can be used in this function and they can be found here: Physics Joint Constants.


GML Code Example

if physics_joint_get_value(revJoint, phy_joint_max_motor_torque) < 2
    physics_joint_set_value(revJoint, phy_joint_max_motor_torque, 2);

The above code checks to see if the joints maximum motor torque is set to less than 2 and if it is it then sets it to 2.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here