love.physics (简体中文)

能模拟2D严格的物体物理特性以现实的方式。这个模块基于Box2D, 并且这个API尽可能严格的符合Box2D API

O.png love.physics不是轻量级的, 甚至不是简单易用的. 这是个十吨重的垂子用于重物提升(额。。。锤子。。。提升??)

如果你仅仅需要制造一个角色跳跃过阻碍或者类似,那么请走开,不要看这里。

 

类型

Body Bodies are objects with velocity and position.
Contact Contacts are objects created to manage collisions in worlds.
Joint Attach multiple bodies together to interact in unique ways.
Shape Shapes are objects used to control mass and collisions.
World A world is an object that contains all bodies and joints.


Functions

love.physics.newBody Creates a new body.
love.physics.newCircleShape Creates a new CircleShape.
love.physics.newDistanceJoint Creates a DistanceJoint between two bodies.
love.physics.newGearJoint Create a GearJoint connecting two Joints.
love.physics.newMouseJoint Create a joint between a body and the mouse.
love.physics.newPolygonShape Creates a new PolygonShape.
love.physics.newPrismaticJoint Creates a PrismaticJoint between two bodies.
love.physics.newPulleyJoint Creates a PulleyJoint to join two bodies to each other and the ground.
love.physics.newRectangleShape Shorthand for creating rectangluar PolygonShapes.
love.physics.newRevoluteJoint Creates a pivot joint between two bodies.
love.physics.newWorld Creates a new World.

See Also


Other Languages

Personal tools