Skip to main content

Blog Archive

Constraints Available in Studio

July 26, 2016

by Tim Loduha


Archive

When we introduced our upgraded physics engine – the PGS Solver – last October, it brought new levels of physics fidelity and faster performance to game simulation. Developers could take full advantage of the PGS Solver to build robust, complex simulations with more rigidity and greater collision detection than ever before. To fully unleash the power and creative possibilities of our physics engine, we are excited to bring you a collection of new Constraints, also known as Mechanical Joints!  

Prior to this update, Roblox only offered Hinge and Motor Joints which constrain the relative rotation between two parts about an axis. The new joints offer additional ways to constrain and specify relative motion between parts. Many of the new joints also have advanced properties to control the limits of motion. As a result, builders will be able to create complicated machines and mechanisms with super-realistic behavior.

Without further ado, let’s start by taking a brief look at each joint and how they look in-game. Afterwards, we’ll show you how these new joints have been used to create realistic vehicle suspensions and a vehicle mounted rail gun.  

BallConstraint

This is the well-known ball and socket configuration which constrains attachments so they occupy the same position. The attachments can freely rotate about all of their axes by default. Cone limits are available for further customization.

BlogBallSocket

HingeConstraint

A HingeConstraint constrains attachments so they occupy the same position and their x-axes point in the same direction.

BlogHinge

As you can see below, the constraint also allows for motorized or free rotation about an axis. Angular limits can be applied for further customization.

BlogMotor

PrismaticConstraint

If you’re using a PrismaticConstraint, the motion is constrained to translation (no rotation) about an axis. You can also have linear motorized motion and position limits.

BlogPrismatic

RodConstraint

A RodConstraint constrains two attachments at a fixed distance, but they can both rotate freely.

BlogRod

RopeConstraint

A RopeConstraint constrains two attachments such that they are not separated from one another further than a specified distance.

BlogRope

SpringConstraint

When using a SpringConstraint, the points on each part will have an equal and opposite applied force based on spring and damper behavior.

BlogSpring

 

Each of these joints can be used immediately to begin building realistic and incredibly robust machines and mechanisms, like vehicle suspension and a vehicle-mounted rail gun. Check out the two videos below to see these examples in action!

Imagine driving a buggy across sand dunes or valleys with improved handling and enhanced physical simulation:

Or using this rail gun to dominate your foes in a tower-defense style game, for example:

Based on popular demand, we will be looking into adding more joints so you can continue creating anything you imagine with even greater complexity. If you want to see something specific, please let us know in the comments below!

For more information on joint usage, please see our Roblox Wiki or the thread on our developer forum.

We look forward to seeing what you build with Mechanical Joints!