Difference between revisions of "Body:applyImpulse"
(Added oldin notice.) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{oldin|[[0.8.0]]|080|type=method|text=It has been renamed to [[Body:applyLinearImpulse]]}} | |
Applies an impulse to a body. | Applies an impulse to a body. | ||
This makes a single, instantaneous addition to the body momentum. | This makes a single, instantaneous addition to the body momentum. | ||
Line 26: | Line 26: | ||
* [[parent::Body]] | * [[parent::Body]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=Applies an impulse to a body. | + | {{#set:Description=Applies an impulse to a body.}} |
− | }} | + | {{#set:Since=000}} |
+ | == Other Languages == | ||
+ | {{i18n|Body:applyImpulse}} |
Latest revision as of 22:08, 12 April 2012
Removed in LÖVE 0.8.0 |
It has been renamed to Body:applyLinearImpulse. |
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.
Function
Synopsis
Body:applyImpulse( ix, iy, x, y )
Arguments
number ix
- The x component of the impulse.
number iy
- The y component of the impulse.
number x
- The x position to apply the impulse.
number y
- The y position to apply the impulse.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info