Game Development Reference
In-Depth Information
joint.enableMotor(true, 0, 1);
7. Now, we can create a new DoorCloseControl instance in the main class, at-
tach it to the doorGeometry class, and give it the same joint we used previ-
ously in the recipe, as follows:
DoorCloseControl doorControl = new DoorCloseControl();
doorControl.setHingeJoint(joint);
doorGeometry.addControl(doorControl);
Search WWH ::




Custom Search