World:translateOrigin

World:translateOrigin Available since LÖVE 0.9.0 This function is not supported in earlier versions. Translates the World's origin. Useful in large worlds where floating point precision issues become noticeable at far distances from the origin. Function Synopsis World:translateOrigin( x, y ) Arguments number x The x component of the new origin with respect to the old origin. number y The y component of the new origin with respect to the old origin. Returns Nothing. See Also World

World:update

World:update Update the state of the world. Function Synopsis World:update( dt ) Arguments number dt The time (in seconds) to advance the physics simulation. Returns Nothing. See Also World

World:setSleepingAllowed

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

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: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: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: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: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: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: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