love.physics.newCircleShape

love.physics.newCircleShape Script Example Missing love.physics.newCircleShape needs a script example, help out by writing one. Creates a new CircleShape. Function Available since LÖVE 0.8.0 These variants are not supported in earlier versions. Synopsis shape = love.physics.newCircleShape( radius ) Arguments number radius The radius of the circle. Returns CircleShape shape The new shape. Function Synopsis shape = love.physics.newCircleShape( x, y, radius ) Arguments number x The

love.physics.newChainShape

love.physics.newChainShape Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a new ChainShape. Due to a limitation of the current collision algorithm, collision with chain shapes can react in a odd manner. see [here] Function Synopsis shape = love.physics.newChainShape( loop, x1, y1, x2, y2, ... ) Arguments boolean loop If the chain should loop back to the first point. number x1 The x position of the first point. number y1 The y position of the firs

love.physics.newBody

love.physics.newBody Creates a new body. There are three types of bodies. Static bodies do not move, have a infinite mass, and can be used for level boundaries. Dynamic bodies are the main actors in the simulation, they collide with everything. Kinematic bodies do not react to forces and only collide with dynamic 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. Function Availabl

love.physics.getMeter

love.physics.getMeter Available since LÖVE 0.8.0 This function is not supported in earlier versions. Returns the meter scale factor. All coordinates in the physics module are divided by this number, creating a convenient way to draw the objects directly to the screen without the need for graphics transformations. It is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters. Function Syno

love.physics.getDistance

love.physics.getDistance Available since LÖVE 0.8.0 This function is not supported in earlier versions. Returns the two closest points between two fixtures and their distance. This function does not work correctly in 0.8.0 and may terminate LÖVE without errors. Function Synopsis distance, x1, y1, x2, y2 = love.physics.getDistance( fixture1, fixture2 ) Arguments Fixture fixture1 The first fixture. Fixture fixture2 The second fixture. Returns number distance The distance of the two poi

love.mousereleased

love.mousereleased Callback function triggered when a mouse button is released. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.mousereleased( x, y, button, istouch ) Arguments number x Mouse x position, in pixels. number y Mouse y position, in pixels. number button The button index that was released. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent. boolea

love.mousepressed

love.mousepressed Callback function triggered when a mouse button is pressed. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.mousepressed( x, y, button, istouch ) Arguments number x Mouse x position, in pixels. number y Mouse y position, in pixels. number button The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent. boolean is

love.mousemoved

love.mousemoved Available since LÖVE 0.9.2 This function is not supported in earlier versions. Callback function triggered when the mouse is moved. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.mousemoved( x, y, dx, dy, istouch ) Arguments number x The mouse position on the x-axis. number y The mouse position on the y-axis. number dx The amount moved along the x-axis since the last time love.mousemoved was called. number dy Th

love.mousefocus

love.mousefocus Available since LÖVE 0.9.0 This callback is not supported in earlier versions. Callback function triggered when window receives or loses mouse focus. Function Synopsis love.mousefocus( focus ) Arguments boolean focus Wether the window has mouse focus or not. Returns Nothing. Example function love.load() text = "Mouse is in the window!" end   function love.draw() love.graphics.print(text,0,0) end   function love.mousefocus(f) if not f then text = "Mouse is not

love.mouse.setY

love.mouse.setY Available since LÖVE 0.9.0 This function is not supported in earlier versions. Sets the current Y position of the mouse. The coordinates of the mouse pointer are always whole numbers, but even if you try setting a non-integer, löve will floor it internally. Function Synopsis love.mouse.setY( y ) Arguments number y The new position of the mouse along the y-axis. Returns Nothing. See Also love.mouse love.mouse.setPosition love.mouse.setX love.mouse.getY