Body:getMass

Body:getMass Get the mass of the body. Static bodies always have a mass of 0. Function Synopsis mass = Body:getMass( ) Arguments None. Returns number mass The mass of the body (in kilograms). See Also Body

Body:getMassData

Body:getMassData Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the mass, its center, and the rotational inertia. Function Synopsis x, y, mass, inertia = Body:getMassData( ) Arguments None. Returns number x The x position of the center of mass. number y The y position of the center of mass. number mass The mass of the body. number inertia The rotational inertia. See Also Body Body:setMassData

Body:getPosition

Body:getPosition Get the position of the body. Note that this may not be the center of mass of the body. Function Synopsis x, y = Body:getPosition( ) Arguments None. Returns number x The x position. number y The y position. See Also Body

Body:getType

Body:getType Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the type of the body. Function Synopsis type = Body:getType( ) Arguments None. Returns BodyType type The body type. See Also Body Body:setType

Body:getUserData

Body:getUserData Available since LÖVE 0.9.1 This method is not supported in earlier versions. Returns the Lua value associated with this Body. Use this function in one thread and one thread only. Using it in more threads will make Lua cry and most likely crash. Function Synopsis value = Body:getUserData( ) Arguments None. Returns any value The Lua value associated with the Body. See Also Body Body:setUserData

Body:getWorld

Body:getWorld Available since LÖVE 0.9.2 This method is not supported in earlier versions. Gets the World the body lives in. Function Synopsis world = Body:getWorld( ) Arguments None. Returns World world The world the body lives in. See Also Body World

Body:getWorldCenter

Body:getWorldCenter Get the center of mass position in world coordinates. Use Body:getLocalCenter to get the center of mass in local coordinates. Function Synopsis x, y = Body:getWorldCenter( ) Arguments None. Returns number x The x coordinate of the center of mass. number y The y coordinate of the center of mass. See Also Body

Body:getWorldPoint

Body:getWorldPoint Transform a point from local coordinates to world coordinates. Function Synopsis worldX, worldY = Body:getWorldPoint( localX, localY ) Arguments number localX The x position in local coordinates. number localY The y position in local coordinates. Returns number worldX The x position in world coordinates. number worldY The y position in world coordinates. See Also Body

Body:getWorldPoints

Body:getWorldPoints Available since LÖVE 0.8.0 This method is not supported in earlier versions. Transforms multiple points from local coordinates to world coordinates. Function Synopsis x1, y1, x2, y2, ... = Body:getWorldPoints( x1, y1, x2, y2, ... ) Arguments number x1 The x position of the first point. number y1 The y position of the first point. number x2 The x position of the second point. number y2 The y position of the second point. Returns number x1 The transformed x positio

Body:getWorldVector

Body:getWorldVector Transform a vector from local coordinates to world coordinates. Function Synopsis worldX, worldY = Body:getWorldVector( localX, localY ) Arguments number localX The vector x component in local coordinates. number localY The vector y component in local coordinates. Returns number worldX The vector x component in world coordinates. number worldY The vector y component in world coordinates. See Also Body