4) Jointing Basics
Up until now, we have only made objects that will be affected by gravity and collisions in SP. Now we'll learn how to use joints to make automated or specific movement in our models.
There are a number of different joints you can choose to add to your model, and each joint has a specific behavior.
The joints also have their own special tool for defining their connections, the Joint Connector tool:
Before we get started, let’s be clear on the terminology I’ll be using throughout this guide.
One of the harder concepts for me to grasp when first working with
SP was when to joint-connect an object to a joint, or when to group it with a
joint. Thanks to C. Phillips, I now have a better understanding of when to do
With that being said, let’s move on to an example, and build a car that rolls. If you want to follow along with this tutorial, you can download the basic model HERE.
NOTE: The model just contains the primitive shapes. To make it work, you'll have to follow this tutorial and put it together.
The first thing we'll want to do is make a simple body and group it.
Next we'll make a wheel shape and group it.
Set the shape of the wheel to "convex-hull" or "sphere" and make 3 copies of it:
(Click any picture below to enlarge)
Next move the wheels to where you want them to be on the body. It is easier to move the wheels if they have a design with some sort of center point. (This is why I made them in 4 sections instead of one solid circle.)
Now let’s get to the jointing and grouping and make this thing work.
Remembering the 3 step process mentioned above, we'll start with step one:
I. Add a joint for the part you want to make move.
We'll use a HINGE joint for each wheel to make them spin. So place a hinge joint at the center of your first wheel and set the axis. This is a two click step. The first one places the joint, and the second click sets the axis depending on where you move your mouse.
Be sure to set the axis correctly!
Now on to step 2:
II. Make the moveable part and the joint a group.
By grouping the wheel and the joint, we have made them behave like "one piece". But they still won't spin until we define a "parent" object for them to spin in relation to. So let's move on to step 3:
III. Joint-connect the joint to a “parent” object in the model.
Using the Joint-Connector tool, Joint-Connect the wheel hinge to the body.
doing this, we have given the hinge a "parent" object. (The body) It is
now connected to the body, and it will spin in relation to the body.
And since our wheel is grouped with the hinge, it will spin as the
Now repeat the process for the other three wheels. Make a new hinge for each wheel, group it to its respective wheel, and joint connect it to the body.
This brings up another point to be made when working with joints. I have found that copying joints leads to unexpected results, so don't copy the hinge for the other three wheels. Be sure to make a new hinge for each wheel.
In the end, you should have all four hinges joint-connected to the body, making it a parent to all the hinges. And since the wheels are grouped to their hinges, the entire model will behave as one big family.
It's now time to test our car. If we RUN the animation now, the entire car would fall into space as one object. So let's make a ground plane for the car to rest on. You can either make a ground plane yourself and set it to "STATIC MESH" or you can use the auto-shape (SOLID FLOOR) to make the plane in one click.
RUN the animation and you should be able to drag the car around the ground plane with the wheels spinning as it moves.
From this point there are a number of options to make the car move on its own. You could make one of the joints a motor instead of a hinge. Or you could slope the ground plane to watch it roll down hill.