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
- 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.
For more information on how to build constraints, please visit the wiki page:
and the api pages:
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.