|Available since LÖVE 0.8.0|
|This method is not supported in earlier versions.|
Applies an impulse to a body. This makes a single, instantaneous addition to the body momentum.
An impulse pushes a body in a direction. A body with with a larger mass will react less. The reaction does not depend on the timestep, and is equivalent to applying a force continuously for 1 second. Impulses are best used to give a single push to a body. For a continuous push to a body it is better to use Body:applyForce.
If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia).
Note that the impulse components and position must be given in world coordinates.
Body:applyLinearImpulse( ix, iy )
- The x component of the impulse applied to the center of mass.
- The y component of the impulse applied to the center of mass.
Body:applyLinearImpulse( ix, iy, x, y )
- The x component of the impulse.
- The y component of the impulse.
- The x position to apply the impulse.
- The y position to apply the impulse.
Tiếng Việt –