Developer   API   Game Development   Box2D   Native   b2MouseJoint

b2MouseJoint(native)

A mouse joint is used to make a point on a body track a specified world point.

Properties

  • dampingRatio : Float
    The damping ratio (dimensionless).
  • frequency : Float
    The frequency in Hertz.
  • maxForce : Float
    The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).

Methods

  • getTarget() : Multivalue
    Use this to get the target point.
  • setTarget(x, y) : b2MouseJoint
    Use this to update the target point.

Remarks

This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.

API Navigation
Skip Navigation Links.
Expand <span>User Interface</span> User Interface
Expand <span>Core & System</span> Core & System
Expand <span>Graphics</span> Graphics
Expand <span>Files and Databases</span> Files and Databases
Expand <span>Crypto</span> Crypto
Expand <span>Native User Interface</span> Native User Interface
Expand <span>Net</span> Net
Expand <span>Media</span> Media
Expand <span>Sensor</span> Sensor
Collapse <span>Game Development</span> Game Development
Collapse <span>Box2D</span> Box2D
Collapse <span>Native</span> Native
b2World
b2Body
b2Contact
b2CircleShape
b2PolygonShape
b2DistanceJoint
b2FrictionJoint
b2GearJoint
b2MouseJoint
b2PrismaticJoint
b2PulleyJoint
b2RevoluteJoint
b2WeldJoint
PhysicsWorld
PhysicsBody
PhysicsContact
PhisicsScene
PhisicsSprite
Expand <span>Animation</span> Animation
Expand <span>Game2D</span> Game2D
Expand <span>Particle System</span> Particle System
Expand <span>Scene Transition</span> Scene Transition
Game
Canvas
Bitmap
Paint