World:setMeter

World:setMeter

Removed in LÖVE 0.8.0
This method is not supported in that and later 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

World:setMeter( scale )

Arguments

number scale
The size of 1 meter in pixels.

Returns

Nothing.

See Also


© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/World:setMeter

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部