Introducing UniversalConstraint

Dear developers,

We have released a new mechanical constraint called UniversalConstraint. This physics constraint ensures that two attachments are co-located (similar to BallSocketConstraint) and that their secondary axes remain perpendicular (see the picture below). In this sense, this constraint is more restrictive than the BallSocketConstraint but is less restrictive than HingeConstraint (by one degree of freedom).

A few example use cases for UniversalConstraint would be power transmission between the transmission and rear drive shafts of rear-wheel drive cars, constant velocity joints, robotics, etc. (See this article)

How to Use

The joint is accessible under the “Model/Create” menu. To use the constraint, select the constraint, place an attachment on one body and the second attachment on a different body. You can also limit the relative angular motion of the primary axes of attachments via LimitsEnabled properties. This way the motion of the primary axis of attachement1 will be limited by a cone. This cone is formed via attachment0 and its primary axis and its angle is defined via the MaxAngle property. (See documentation)

Let’s try to build new mechanisms with this constraint and let us know if you have any questions!


Universal_joint

230 Likes

This topic was automatically opened after 13 minutes.

This is pretty sick, actually! I’ve never really used constraints, but I like this.

I would like to see a feature added where you could change the speed of the “connection.” Because it goes way too fast in my opinion


My only concern this does cause crashing for my Mac computer.

Whenever I turn on “LimitsEnabled” and set the MaxAngle to 180 (the max), it sometimes crashes. I can’t reproduce because it’s inconsistent crashing (if that makes sense).

woah

15 Likes

Ooh… a new joint. nice i cant wait to see what people do with this! Maybe show a few examples to see what can be done with this?

5 Likes

Would it be possible to see some visual examples of what can be achieved with this new constraint?

7 Likes

Here’s a little demo if any of you are having trouble visualizing it like I was.

Note: This is only the default behavior, hop in studio and mess around with the properties yourself!

Edit: Ignore the craziness in the beginning, the framerate of the GIF recorder I used made it look wacky.

20 Likes

Edit: Roblox has edited their original post and included an example so my comment is now redundant. :sweat_smile:

For those wondering, the UniversalConstraint is replicating the behaviour of a mechanism such as shown in the picture below. It’s like a combination of two hinges that acts similarly to a BallSocket with the exception that it can only rotate on 2 axis, compared to 3 axis with the BallSocket.
unnamed

28 Likes

I personally wanna use this for things like “the force” from Star Wars with this constraint.

Here’s an example that I made with my nerdiness of Star Wars:

It’s sloppy, but I think it’s get’s the point across.

23 Likes

Such a great update, its good to see roblox making good updates like that.

8 Likes

Here, Orange being the UniversalConstraint and Blue the BallSocket.
You’ll notice that there is a rotation that the orange doesn’t accept compared to the blue one.

28 Likes

This brings a whole new utillity to studio. This makes up for some of the less useful features as of late. Im already thinking of many practical applications for this, as mentioned in this article car physics demonstrations :flushed:.

Thanks Roblox :+1:

10 Likes

just added these to my game astromakers. not sure what they can be used for but always good to have more options for mechanical blocks!

31 Likes

Here is another example;
Making a constant velocity joint to transfer rotation from one axis to another one when they are not aligned. This is possible with two universal joints (see this article)

20 Likes

Awesome!
It should allow things like instead of having 4 different HingeConstraints driving 4 different wheels and the issues that example has with wheel spin (for example when driving over a large sharp item sometimes 1 or 2 wheels will spin while the others will be over-limit for their torque and won’t rotate so the vehicle gets stuck).
I actually built a realistic universal joint that functions with a couple of HingeConstraints on the center driveshaft for my front end loader here: Construction Site - Roblox

5 Likes

@mileniux89 will this behave as a true universal joint, or will it be more like a CV joint in operation?

If a universal joint has the driving shaft rotating at a constant rpm the driven shaft (at larger angles) will rotate at a varying speed, slowing down and speeding up during a single 360 degree rotation.

4 Likes

Right, this is indeed a universal joint. The CV joint mentioned above is just one example achieved by combining multiple universal constraints and parts. So for universal constraint a constant rotation speed on the driver shaft does not translate into the same rotational velocity on the driven shaft.

5 Likes

I have a quick question does this mean that the ball socket constraint will get removed?
I know this one is new and more useful, But the ball socket has more properties will those properties get moved over?

2 Likes

Not at all! This is a new constraint that you can apply to build new things while still using ballSocket and other constraints.
We can definitely add more features to this new constraint later on once we receive some feedback from developers about how they use the constraint and how we can improve its functionality

5 Likes

Ahh okay i understand but one more thing compared to the other popular constraints this one only has a few properties. Will there be more in the future?

3 Likes

I wonder if I tweening models using this feature is more performant than tweening using Tween Service.

2 Likes