Hinge constraints

HingeConstraint, as the name implies, allows you to create an object that behaves like a hinge. It rotates around a specific axis, limiting the movement to a specified angle. In our example, HingeConstraint is shown with two green flippers at the bottom of the scene (example, 05-sliders-hinges.html):

These flippers are constrained to the small cubes and can rotate around them. If you want to play around with these hinges, you can enable them by clicking the flipUp and flipDown buttons in the menu. This will accelerate the flippers to the velocity specified in the motor menu. 

Let's take a closer look at how we created one ...

Get Learn Three.js - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.