The new mechanical constraints (aka joints) are now enabled!
Constraints allow new ways of creating simulated mechanisms by providing more advanced connections between bodies. You can now easily create simple mechanisms such as
actuated doors with angular limits
sliding doors with positional limits
motorized wheels with fine control over the angular speed and torque
ragdolls
vehicle suspension with springy behavior
vehicle steering system
Here is a game that demonstrates most of the new capabilities using a simulated vehicle:
The following constraints are now provided through the API:
Ball Constraint
Hinge Constraint
Prismatic Constraint
Spring Constraint
Rod Constraint
Rope Constraint
The constraints are built using the concept of attachments. For each constraint, two attachments are necessary and their properties will affect the behavior of the constraint. For example to create a spring, you’ll need to instantiate an attachment as a child of the first part and a second attachment as a child of the second part, and then instantiate the spring constraint and set both attachment as properties of the constraint. The constraint can be parented to anything.
You can toggle the visibility of the attachments and constraints in Studio, use the options options “AreAttachmentsShown” and “AreConstraintsShown” in Settings under the Physics:
P.S. I just noticed we have a bug in PrismaticConstraint on methods UpperLimit and LowerLimit. Please avoid using limits on Prismatic until a fix is released.
WARNING: There is a bug in PrismaticConstraint’s set methods UpperLimit and LowerLimit. Please avoid using limits on Prismatic until a fix is released.
From what I’m thinking, you pretty much have to code the joints. The new constraints don’t attach to a VehicleSeat, so the wheels aren’t going to turn. I spent about an hour messing with constraints and attempting to make a vehicle, and so far, it’s a pain.
It’s a car chassis I was coding before the constraints update. This version uses body thrusts to generate a torque in the wheel, and it’s almost all controlled by local scripts. I don’t think there’s any way to make cars with constraints without a fair amount of coding.
You’ll generally need a stiffness in the thousands at least, and to attach a PrismaticConstraint parallel to the spring. I can’t really help with that: I just used trial and error until the orientations came out correctly.
You can drive them round the default roblox race map: