Method CreateRevoluteJoint
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
CreateRevoluteJoint(RevoluteJointDefinition)
Creates a hinge.
public RevoluteJoint CreateRevoluteJoint(RevoluteJointDefinition definition)Parameters
definitionRevoluteJointDefinition-
The joint settings.
Returns
- RevoluteJoint
-
The new joint.
Examples
var hinge = world.CreateRevoluteJoint(
RevoluteJointDefinition.Hinge(frame, door, hingePoint, Vector3.UnitY) with
{
LimitsEnabled = true,
LowerAngle = 0.0f,
UpperAngle = MathF.PI * 0.5f,
});
Exceptions
- ObjectDisposedException
-
The world has been disposed.
- ArgumentException
-
The definition does not name two distinct, valid bodies.