Difference between revisions of "Body:applyAngularImpulse"
m |
(ApplyForce is better for linear movement. This is about angular movement so I changed this to applyTorque) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{newin|[[0.8.0]]|080|type=method}} | {{newin|[[0.8.0]]|080|type=method}} | ||
− | Applies an angular impulse to a body. This makes a single, instantaneous addition to the body momentum. | + | Applies an angular impulse to a body. This makes a single, instantaneous addition to the body momentum. Applying an angular impulse large enough will rotate the body. |
− | 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: | + | 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:applyTorque]]. |
== Function == | == Function == | ||
Line 15: | Line 15: | ||
== See Also == | == See Also == | ||
* [[parent::Body]] | * [[parent::Body]] | ||
+ | * [[Body:applyLinearImpulse]] | ||
+ | * [[Body:applyTorque]] | ||
+ | * [[Body:getAngle]] | ||
+ | * [[Body:getAngularVelocity]] | ||
+ | * [[Body:getInertia]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Applies an angular impulse to a body.}} | {{#set:Description=Applies an angular impulse to a body.}} | ||
{{#set:Since=080}} | {{#set:Since=080}} | ||
+ | |||
== Other Languages == | == Other Languages == | ||
{{i18n|Body:applyAngularImpulse}} | {{i18n|Body:applyAngularImpulse}} |
Latest revision as of 04:04, 1 October 2023
Available since LÖVE 0.8.0 |
This method is not supported in earlier versions. |
Applies an angular impulse to a body. This makes a single, instantaneous addition to the body momentum. Applying an angular impulse large enough will rotate the body.
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:applyTorque.
Function
Synopsis
Body:applyAngularImpulse( impulse )
Arguments
number impulse
- The impulse in kilogram-square meter per second.
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