Difference between revisions of "love.physics.setMeter"

(Created page with "{{newin|0.8.0|type=variants|plural=y}} 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 ...")
 
Line 21: Line 21:
 
== See Also ==
 
== See Also ==
 
* [[parent::World]]
 
* [[parent::World]]
 +
* [[love.physics.getMeter]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Set the scale of the world.}}
 
{{#set:Description=Set the scale of the world.}}

Revision as of 08:23, 4 April 2012

Available since LÖVE 0.8.0
These variants are not supported in earlier versions.


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

love.physics.setMeter( scale )

Arguments

number scale
The size of 1 meter in pixels.

Returns

Nothing.

See Also


Other Languages