Difference between revisions of "World:setMeter"
(Initial Portuguese translation) |
m |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{oldin|[[0.8.0]]|080|type=method|text=It has been replaced by [[love.physics.setMeter]]}} | |
+ | Set 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. | |
− | + | The default scale for new worlds is 30 pixels per meter. | |
− | + | 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 === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | World:setMeter( | + | World:setMeter( scale ) |
</source> | </source> | ||
− | === | + | === Arguments === |
− | {{param|number | + | {{param|number|scale|The size of 1 meter in pixels.}} |
− | === | + | === Returns === |
− | + | Nothing. | |
− | == | + | == See Also == |
− | * [[parent::World | + | * [[parent::World]] |
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description= | + | {{#set:Description=Set the scale of the world.}} |
− | == | + | {{#set:Since=000}} |
+ | == Other Languages == | ||
{{i18n|World:setMeter}} | {{i18n|World:setMeter}} |
Latest revision as of 13:12, 22 May 2024
Removed in LÖVE 0.8.0 |
It has been replaced by love.physics.setMeter. |
Set 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.
The default scale for new worlds is 30 pixels per meter.
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
World:setMeter( scale )
Arguments
number scale
- The size of 1 meter in pixels.
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