Difference between revisions of "World:getMeter"

 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{oldin|[[0.8.0]]|080|type=method|text=It has been replaced by [[love.physics.getMeter]]}}
 
Get the scale of the world.
 
Get the scale of the world.
  
Line 19: Line 20:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Get the scale of the world.}}
 
{{#set:Description=Get the scale of the world.}}
{{#set:Since=000}}
+
 
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|World:getMeter}}
 
{{i18n|World:getMeter}}

Latest revision as of 13:13, 22 May 2024

Removed in LÖVE 0.8.0
It has been replaced by love.physics.getMeter.

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 = World:getMeter( )

Arguments

None.

Returns

number scale
The size of 1 meter in pixels.

See Also


Other Languages