Wheel-Gear physics joint

GameMaker Studio developers

Wheel-Gear physics joint

The Wheel-Gear physics joint provides us with a joint very similar to that of revolute, but with the difference that we can add suspension to our rotating object. We will also see the Gear Joint, which can attribute to two objects the ability to join their joints, either prismatic or revolution, to work together.

SoloStudio Tech Youtube Channel

1.0 – Creating a Wheel Joint

We will start by creating a Wheel type and see the characteristic that differentiates it from a revolute joint.

For this and as always, we access the main physics panel to assign the density and type of joint to our object.

Before entering to see the different options that allow us to adjust the SET JOINT panel, we will trace with our mouse the direction in which our joint oscillates as if it were a suspension.

This is the most notable difference with his sister the Revolute joint, since it will not be a rigid engine and reacts to the weight it supports and its surroundings.

Now we will configure its characteristics, where we enable an engine, power and speed. We will give an oscillation frequency and adjust the recovery value of our suspension.

In the image below you have a clear example of the modifications we have made for this example.

When starting the simulation, we observe how our wheel begins to turn according to the indicated values. The joint will affect the behavior of our platform, which has a previously configured prismatic joint .

We already mentioned in previous articles that we can join as many meetings as we want depending on the type that is used. On this occasion we have doubled our object twice to get 3 together.

The more joints of this type, the more power we will be giving to our structure.

1.1 – Assigning the collision map

Although the graphics do not match the shape of our collision, we will assign to our wheels a circular shape, which would be the most logical for this occasion.

I am not an illustrator, so I am very sorry not to be able to show you in a correct way how our set of objects would be with the appropriate graphics. But this is not the purpose of these tutorials, but to show you how the physics system works from which illustrators can profit by drawing their own wheels.

Anyway, you can get an idea of how our collision system would look like by activating in simulation mode the option of being able to see the collision map. This is done by pressing the F6 key on our keyboard.

1.2 – Linking other creations

Let’s move on to the second phase of this article, where we are going to set up a Revolute board that we will join with our platform.

We have already created our board, which looks like a pulley that wobbles from side to side. But it is not what we want to happen in this case.

Imagine we want this pulley to simulate that it is on an imaginary rail. But not only that, but this one, rotate relative to the speed with which our platform falls. This is what we will see next …

1.3 – Combining joints

It is time to configure a support object, which stores the GEAR JOINT board. When we open the SET JOINT panel we find 3 configuration values.

These values serve to make two boards work as a unified mechanism. For this, we are invited to select two boards to participate in the configuration.

he RATIO value is the one in charge of adjusting how much the movement of a joint influences the activity of the other. A value of 1 one gives us a balanced weight between them.

As we see in the image below, we select 2 objects, our platform and the joint that simulates a pulley on this …

We can not see in images that happens next, but basically what happens is that our pulley rotates relative to the displacement of our platform.

In the same way we can change this configuration so that 2 rotary joints work together.

The result is a pulley that rotates as if it were a gear. The illustration shows some strokes defining their movement when we activate the collision interface.

As in previous cases, we are allowed with the cursor to hook these joints to control them and to conduct behavior tests.

1.4 – Conclusions

Every time we have more objects with different configurations in our physical world. We begin to observe the possibilities offered to be able to control these types of objects in real time.

It should be noted that franchises such as Angry Birds or Little Big Planet use these techniques in their video games. Now these techniques are at your disposal directly into the editor.


We strongly recommend that you view the video located at the beginning of this article to get a clear idea of this section.

The video tutorials provided on the YouTube channel support subtitle contributions from users. This means that any user can contribute to add subtitles with the editor and the new contribution program of YouTube subscribers.

We have already seen practically all the physical functionalities, in the absence of one, which we will see in a brief explanation in the following article. We will also talk about the performance of our engine and how to optimize our scenario.

From here we send greetings and see you in the next tutorial!

You may also like:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.