Urho.Urho2D.ConstraintRevolute2D Class
See Also: ConstraintRevolute2D
Syntax
Remarks
This constraint forces two bodies to share a common hinge anchor point ConstraintRevolute2D.Anchor.
You can control the relative rotation of the two bodies (the constraint angle) using a limit and/or a motor. A limit ConstraintRevolute2D.EnableLimit forces the joint angle to remain between a lower ConstraintRevolute2D.LowerAngle and upper ConstraintRevolute2D.UpperAngle bound.
The limit will apply as much torque as needed to make this happen. The limit range should include zero, otherwise the constraint will lurch when the simulation begins. A motor (ConstraintRevolute2D.EnableMotor) allows you to specify the constraint speed (the time derivative of the angle). The speed (ConstraintRevolute2D.MotorSpeed) can be negative or positive.
When the maximum torque (ConstraintRevolute2D.MaxMotorTorque) is exceeded, the joint will slow down and can even reverse. You can use a motor to simulate friction. Just set the joint speed to zero, and set the maximum torque to some small, but significant value. The motor will try to prevent the constraint from rotating, but will yield to a significant load.
Requirements
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0
The members of Urho.Urho2D.ConstraintRevolute2D are listed below.
See Also: Constraint2D
Public Constructors
Constructs a new instance of Urho.Urho2D.ConstraintRevolute2D which is tied to the Application.CurrentContext. | ||
Constructs a new instance of Urho.Urho2D.ConstraintRevolute2D, given a raw pointer to an unmanaged object | ||
Constructs a new instance of Urho.Urho2D.ConstraintRevolute2D linked to a specific Context. |
Protected Constructors
Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field. |
Public Properties
Anchor | Vector2. Return anchor. Or Set anchor. | |
EnableLimit | Boolean. Return enable limit. Or Set enable limit. | |
EnableMotor | Boolean. Return enable motor. Or Set enable motor. | |
LowerAngle | Single. Return lower angle. Or Set lower angle. | |
MaxMotorTorque | Single. Return max motor torque. Or Set max motor torque. | |
MotorSpeed | Single. Return motor speed. Or Set motor speed. | |
[read-only] override | Type | StringHash. Urho's type system type. |
[read-only] override | TypeName | String. Urho's low-level type name. |
[read-only] static | TypeNameStatic | String. Urho's low-level type name, accessible as a static method. |
[read-only] static | TypeStatic | StringHash. Urho's low-level type, accessible as a static method. |
UpperAngle | Single. Return upper angle. Or Set upper angle. |
Public Methods
static | RegisterObject(Context)Register object factory. |