Creates a new body.
There are three types of bodies.
The mass of the body gets calculated when a Fixture is attached or removed, but can be changed at any time with Body:setMass or Body:resetMassData.
Making changes to a World is not allowed inside of the beginContact, endContact, preSolve, and postSolve callback functions, as BOX2D locks the world during these callbacks.
Available since LÖVE 0.8.0
This variant is not supported in earlier versions.
body = love.physics.newBody( world, x, y, type )
World worldnumber x (0)number y (0)BodyType type ("static")Body body Removed in LÖVE 0.8.0
This variant is not supported in that and later versions.
body = love.physics.newBody( world, x, y, m, i )
World worldnumber x (0)number y (0)number m (0)number i (0)Body body
© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.physics.newBody