Documentation
Introduction
Getting Started
Game Distribution
Config Files
License
Documentation Guide
Modules
love
love.audio
love.event
love.filesystem
love.graphics
love.image
love.joystick
love.keyboard
love.mouse
love.physics
love.sound
love.timer
Callbacks
love.joystickreleased
love.joystickpressed
love.load
love.update
love.draw
love.keypressed
love.keyreleased
love.mousepressed
love.mousereleased
love.run
Edit
Module
love.physics
Can simulate 2D rigid body physics in a realistic manner. This module is based on
Box2D
, and this API corresponds to the
Box2D API
as closely as possible.
Types
Body
Bodies are objects with velocity and position.
CircleShape
Circle extends Shape and adds a radius and a local position.
Contact
Contacts are objects created to manage collisions in worlds.
DistanceJoint
Keeps two bodies at the same distance.
GearJoint
Keeps bodies together in such a way that they act like gears.
Joint
Attach multiple bodies together to interact in unique ways.
MouseJoint
For controlling objects with the mouse.
PolygonShape
Polygon is a convex polygon with up to 8 sides.
PrismaticJoint
Restricts relative motion between Bodies to one shared axis.
PulleyJoint
Allows you to simulate bodies connected through pulleys.
RevoluteJoint
Allow two Bodies to revolve around a shared point.
Shape
Shapes are objects used to control mass and collisions.
World
A world is an object that contains all bodies and joints.
Functions
newBody( world, x, y, m, i )
Create a new body.
newCircleShape( body, x, y, radius )
Create a new CircleShape at (x,y) in local coordinates.
newMouseJoint( body, x, y )
Create a joint between a body and the mouse.
newPolygonShape( body, ... )
Creates a new PolygonShape.
newRectangleShape( body, x, y, w, h, angle )
Shorthand for creating rectangluar PolygonShapes.
newRevoluteJoint( body1, body2, x, y )
Create a pivot joint between two bodies.
newWorld( w, h )
Creates a new World.
newWorld( x1, y1, x2, y2, xg, yg, sleep )
Create a new World.
Copyright © 2006-2010 LÖVE Development Team.
Visit Homepage
–
Ask a Question