Box2D::b2MouseJoint - Make a point on a body track a specified point.
my $joint = $world->CreateJoint( $joint_def ); $joint->SetTarget( $target );
A mouse joint is used to make a point on a body track a specified world point. 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.
Implements Box2D::b2Joint.
Box2D::b2Joint
Returns a Box2D::b2Vec2
Box2D::b2Vec2
Returns a float32
float32
Parameters:
float32 $inv_dt
$inv_dt
Set/get the damping ratio (dimensionless).
float32 $ratio
$ratio
Set/get the frequency in Hertz.
float32 $hz
$hz
Set/get the maximum force in Newtons.
float32 $force
$force
Use this to update the target point.
Box2D::b2Vec2 $target
$target
Box2D
Box2D::b2MouseJointDef
Box2D::b2World
See "BUGS" in Box2D
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.