Body:setX

Body:setX Set the x position of the body. This function cannot wake up the body. Function Synopsis Body:setX( x ) Arguments number x The x position. Returns Nothing. See Also Body

Body:setY

Body:setY Set the y position of the body. This function cannot wake up the body. Function Synopsis Body:setY( y ) Arguments number y The y position. Returns Nothing. See Also Body

Body:setUserData

Body:setUserData Available since LÖVE 0.9.1 This method is not supported in earlier versions. Associates a Lua value with the Body. To delete the reference, explicitly pass nil. 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 Body:setUserData( value ) Arguments any value The Lua value to associate with the Body. Returns Nothing. See Also Body Body:getUserData

Body:setType

Body:setType Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets a new body type. Function Synopsis Body:setType( type ) Arguments BodyType type The new type. Returns Nothing. See Also Body Body:getType

Body:setSleepingAllowed

Body:setSleepingAllowed Available since LÖVE 0.8.0 This method is not supported in earlier versions. Sets the sleeping behaviour of the body. Should sleeping be allowed, a body at rest will automatically sleep. A sleeping body is not simulated unless it collided with an awake body. Be wary that one can end up with a situation like a floating sleeping body if the floor was removed. Function Synopsis Body:setSleepingAllowed( allowed ) Arguments boolean allowed True if the body is allowed to

Body:setPosition

Body:setPosition Set the position of the body. Note that this may not be the center of mass of the body. This function cannot wake up the body. Function Synopsis Body:setPosition( x, y ) Arguments number x The x position. number y The y position. Returns Nothing. See Also Body

Body:setMassFromShapes

Body:setMassFromShapes Removed in LÖVE 0.8.0 This method is not supported in that and later versions. Sets mass properties from attatched shapes. If you feel that finding the correct mass properties is tricky, then this function may be able to help you. After creating the needed shapes on the Body, a call to this function will set the mass properties based on those shapes. Remember to call this function after adding the shapes. Setting the mass properties this way always results in a rea

Body:setMassData

Body:setMassData Available since LÖVE 0.8.0 This method is not supported in earlier versions. Overrides the calculated mass data. Function Synopsis Body:setMassData( x, y, mass, inertia ) Arguments 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. Returns Nothing. See Also Body Body:getMassData

Body:setMass

Body:setMass Sets a new body mass. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis body:setMass( mass ) Arguments number mass The mass, in kilograms. Returns Nothing. Function Removed in LÖVE 0.8.0 This variant is not supported in that and later versions. Sets the mass properties directly. If you're not sure what all this stuff means, you can use Body:setMassFromShapes after adding shapes instead. The first two parameters will be th

Body:setLinearVelocity

Body:setLinearVelocity Sets a new linear velocity for the Body. This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. Function Synopsis Body:setLinearVelocity( x, y ) Arguments number x The x-component of the velocity vector. number y The y-component of the velocity vector. Returns Nothing. See Also Body