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 Synops

World:setGravity

World:setGravity Set the gravity of the world. Function Synopsis World:setGravity( x, y ) Arguments number x The x component of gravity. number y The y component of gravity. Returns Nothing. See Also World

World:setContactFilter

World:setContactFilter Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets a function for collision filtering. If the group and category filtering doesn't generate a collision decision, this function gets called with the two fixtures as arguments. The function should return a boolean value where true means the fixtures will collide and false means they will pass through each other. Function Synopsis World:setContactFilter( filter ) Arguments function filter

World:setCallbacks

World:setCallbacks Sets functions for the collision callbacks during the world update. Four Lua functions can be given as arguments. The value nil removes a function. When called, each function will be passed three arguments. The first two arguments are the colliding fixtures and the third argument is the Contact between them. The postSolve callback additionally gets the normal and tangent impulse for each contact point. See notes. If you are interested to know when exactly each callback is

World:setAllowSleeping

World:setAllowSleeping Available since LÖVE 0.8.0 This method is not supported in earlier versions. Removed in LÖVE 0.9.0 It has been renamed to World:setSleepingAllowed. Sets the sleep behaviour of the world. Function Synopsis World:setAllowSleeping( allowSleep ) Arguments boolean allowSleep True if the bodies are allowed to sleep or false if not. Returns Nothing. See Also World World:getAllowSleeping

World:setAllowSleep

World:setAllowSleep Removed in LÖVE 0.8.0 This method is not supported in that and later versions. Set the sleep behaviour of the world. A sleeping body is much more efficient to simulate than when awake. If sleeping is allowed, any body that has come to rest will sleep. Function Synopsis World:setAllowSleep( permission ) Arguments boolean permission Permission for any body to sleep. Returns Nothing. See Also World

World:rayCast

World:rayCast Available since LÖVE 0.8.0 This method is not supported in earlier versions. Casts a ray and calls a function for each fixtures it intersects. Function Synopsis World:rayCast( x1, y1, x2, y2, callback ) Arguments number x1 The x position of the starting point of the ray. number y1 The y position of the starting point of the ray. number x2 The x position of the end point of the ray. number y2 The y position of the end point of the ray. function callback A function called

World:queryBoundingBox

World:queryBoundingBox Available since LÖVE 0.8.0 This method is not supported in earlier versions. Calls a function for each fixture inside the specified area by searching for any overlapping bounding box (Fixture:getBoundingBox). Function Synopsis World:queryBoundingBox( topLeftX, topLeftY, bottomRightX, bottomRightY, callback ) Arguments number topLeftX The x position of the top-left point. number topLeftY The y position of the top-left point. number bottomRightX The x position of t

World:isSleepingAllowed

World:isSleepingAllowed Available since LÖVE 0.9.0 It has been renamed from World:getAllowSleeping. Gets the sleep behaviour of the world. Function Synopsis allow = World:isSleepingAllowed( ) Arguments None. Returns boolean allow True if bodies in the world are allowed to sleep, or false if not. See Also World World:setSleepingAllowed

World:isLocked

World:isLocked Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns if the world is updating its state. This will return true inside the callbacks from World:setCallbacks. Function Synopsis locked = World:isLocked( ) Arguments None. Returns boolean locked Will be true if the world is in the process of updating its state. See Also World