NAME

Box2D::b2MouseJointDef - Mouse joint definition.

SYNOPSIS

my $joint_def = Box2D::b2MouseJointDef->new();
$joint_def->bodyA( $body_a );
$joint_def->bodyB( $body_b );
$joint_def->target( $target );
$joint_def->maxForce( $max_force );
my $joint = $world->CreateJoint( $joint_def );

DESCRIPTION

Mouse joint definition. This requires a world target point, tuning parameters, and the time step.

METHODS

new()

Default constructor.

Returns a Box2D::b2MouseJointDef

dampingRatio()

dampingRatio( $dampingRatio )

The damping ratio. 0 = no damping, 1 = critical damping.

Parameters:

  • float32 $dampingRatio (optional)

Returns a float32

frequencyHz()

frequencyHz( $frequencyHz )

The response speed.

Parameters:

  • float32 $frequencyHz (optional)

Returns a float32

maxForce()

maxForce( $maxForce )

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).

Parameters:

  • float32 $maxForce (optional)

Returns a float32

target()

target( $target )

The initial world target point. This is assumed to coincide with the body anchor initially.

Parameters:

  • Box2D::b2Vec2 $target (optional)

Returns a Box2D::b2Vec2

SEE ALSO

BUGS

See "BUGS" in Box2D

AUTHORS

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE

See "COPYRIGHT & LICENSE" in Box2D