Difference between revisions of "World:getMeter"

m (1 revision: Imported docs from potato.)
Line 1: Line 1:
  
 +
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 ==
 
== Function ==
Line 13: Line 19:
 
* [[parent::World]]
 
* [[parent::World]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=}}
+
{{#set:Description=Get the scale of the world.
 +
}}

Revision as of 16:17, 14 February 2010

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