See Also: ConstraintMouse2D
Used to manipulate bodies with the mouse.
This constraint is almost used in every Box2D tutorial available on the net, to allow interacting with the 2D scene.
It attempts to drive a point on a body towards the current position of the cursor. There is no restriction on rotation. This constraint has a target point, maximum force, frequency, and damping ratio.
The target point ConstraintMouse2D.Target initially coincides with the body’s anchor point. The maximum force ConstraintMouse2D.MaxForce is used to prevent violent reactions when multiple dynamic bodies interact. You can make this as large as you like. The frequency ConstraintMouse2D.FrequencyHz and damping ratio ConstraintMouse2D.DampingRatio are used to create a spring/damper effect similar to the ConstraintDistance2DConstraintDistance2D.
Many users have tried to adapt the ConstraintMouse2D for game play. Users often want to achieve precise positioning and instantaneous response. The ConstraintMouse2D doesn’t work very well in that context. You may wish to consider using kinematic bodies instead.
Assembly: Urho (in Urho.dll)
Assembly Versions: 188.8.131.52
The members of Urho.Urho2D.ConstraintMouse2D are listed below.
See Also: Constraint2D
|Constructs a new instance of Urho.Urho2D.ConstraintMouse2D which is tied to the Application.CurrentContext.|
|Constructs a new instance of Urho.Urho2D.ConstraintMouse2D, given a raw pointer to an unmanaged object|
|Constructs a new instance of Urho.Urho2D.ConstraintMouse2D linked to a specific Context.|
|DampingRatio||Single. Return damping ratio. Or Set damping ratio.|
|FrequencyHz||Single. Return frequency Hz. Or Set frequency Hz.|
|MaxForce||Single. Return max force. Or Set max force.|
|Target||Vector2. Return target. Or Set target.|
|Type||StringHash. Urho's type system type.|
|TypeName||String. Urho's low-level type name.|
|TypeNameStatic||String. Urho's low-level type name, accessible as a static method.|
|TypeStatic||StringHash. Urho's low-level type, accessible as a static method.|