Leadwerks 3.0 Updated with Joint Motors
Leadwerks 3.0 has been updated with bug fixes and new support for joint motors. Hinge and slider joints can have an optional motor enabled that will rotate or move the joint to a specified orientation, at a speed determined by the new Joint::SetMotorSpeed command. This is great for making doors, elevators, as well as complex machinery made possible by the speed and stability of Newton Dynamics, the physics library powering Leadwerks (as well as the Amnesia series).
All joints can also have limits specified, as well as enabled or disabled dynamically. This means a moving motor can burn out, fall slack, and stop within a limited range of motion. The Joint class documentation demonstrates how to use these commands.
The Sliding Door script has been updated to use joint motors, rather than continuously updating physics. This makes the code quite a lot simpler. A swinging door script has also been added. The "distance" value should be used for the door open distance. Previously, a value called "offset" was used, but this was changed because the swinging doors use "offset" to denote an offset for the rotation center. An example map showing usage of both door types together with a trigger brush connected via flowchart is now provided.
- 3
2 Comments
Recommended Comments