Difference between revisions of "love.physics.getMeter"
(Created page with "{{newin|0.8.0|type=methods|plural=y}} Get the scale of the world. The world scale is the number of pixels per meter. Try to keep your shape sizes less than 10 times this sca...") |
|||
Line 10: | Line 10: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | scale = | + | scale = love.physics.getMeter( ) |
</source> | </source> | ||
=== Arguments === | === Arguments === |
Revision as of 08:15, 4 April 2012
Available since LÖVE 0.8.0 |
These methods are not supported in earlier versions. |
Get the scale of the world.
The world scale is the number of pixels per meter. Try to keep your shape sizes less than 10 times this scale.
This is important because the physics in Box2D is tuned to work well for objects of size 0.1m up to 10m. All physics coordinates are divided by this number for the physics calculations.
Function
Synopsis
scale = love.physics.getMeter( )
Arguments
None.
Returns
number scale
- The size of 1 meter in pixels.
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