The physics system in GameMaker: Studio has a number of functions to apply joints between fixtures.

In the GameMaker: Studio physics world, joints are used to constrain instances to the world or to each other. Typical examples in games include ragdolls, teeters, and pulleys, but joints can be combined in many different ways to create interesting motions or add realism to your game world.

Note: A joint does not need to be deleted when you destroy an instance joined to another instance, nor does it need to be deleted at the end of a room. Except in very specific cases (see the gear joint) as this is dealt with automatically by GameMaker: Studio.

Creating joints

The following pages explain the available joints and how they can be created:

  1. physics_joint_distance_create
  2. physics_joint_revolute_create
  3. physics_joint_prismatic_create
  4. physics_joint_pulley_create
  5. physics_joint_gear_create
  6. physics_joint_rope_create
  7. physics_joint_wheel_create
  8. physics_joint_weld_create
  9. physics_joint_friction_create
  10. physics_joint_delete

Joint Values

Once a joint has been created, it can often be necessary to know its properties in order to change them at specific times in your game. The following functions (with their corresponding internal constants) are available to test and change joint values:

  1. physics_joint_enable_motor
  2. physics_joint_get_value
  3. physics_joint_set_value

Joint Constants

Finally, you can use a number of constants from within GameMaker: Studio functions to get (or set) different properties of certain joints. These constants can all be found in the following section:

  1. Physics Joint Constants

Back: Physics Functions
Next: Soft Body Particles
© Copyright YoYo Games Ltd. 2018 All Rights Reserved