Difference between revisions of "love.physics (简体中文)"

m
Line 1: Line 1:
能模拟2D严格的物体物理特性以现实的方式。这个模块基于[http://www.box2d.org/ Box2D], 并且这个API尽可能严格的符合[http://www.box2d.org/manual.html Box2D API]。中文翻译连接:[http://blog.sina.com.cn/s/blog_c3cfba710101jwwc.html 网易风的驿站blogs-box2d系列翻译文章]
+
能模拟2D严格的物体物理特性以现实的方式。这个模块基于[http://www.box2d.org/ Box2D], 并且这个API尽可能严格的符合[http://www.box2d.org/manual.html Box2D API]。中文翻译连接:[http://khome.blog.163.com/blog/static/23571903820144203138513/ 风的驿站blogs-box2d系列翻译文章]
 
{{notice|love.physics不是轻量级的, 甚至不是简单易用的. 这是个十吨重的垂子用于重物提升(额。。。锤子。。。提升??)
 
{{notice|love.physics不是轻量级的, 甚至不是简单易用的. 这是个十吨重的垂子用于重物提升(额。。。锤子。。。提升??)
 
如果你仅仅需要制造一个角色跳跃过阻碍或者类似,那么请走开,不要看这里。}}
 
如果你仅仅需要制造一个角色跳跃过阻碍或者类似,那么请走开,不要看这里。}}

Revision as of 13:36, 17 April 2016

能模拟2D严格的物体物理特性以现实的方式。这个模块基于Box2D, 并且这个API尽可能严格的符合Box2D API。中文翻译连接:风的驿站blogs-box2d系列翻译文章

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

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

 


类型

BodyBodies are objects with velocity and position.
ContactContacts are objects created to manage collisions in worlds.
JointAttach multiple bodies together to interact in unique ways.
ShapeShapes are objects used to control mass and collisions.
WorldA world is an object that contains all bodies and joints.

Functions

love.physics.newBodyCreates a new body.
love.physics.newCircleShapeCreates a new CircleShape.
love.physics.newDistanceJointCreates a DistanceJoint between two bodies.
love.physics.newGearJointCreate a GearJoint connecting two Joints.
love.physics.newMouseJointCreate a joint between a body and the mouse.
love.physics.newPolygonShapeCreates a new PolygonShape.
love.physics.newPrismaticJointCreates a PrismaticJoint between two bodies.
love.physics.newPulleyJointCreates a PulleyJoint to join two bodies to each other and the ground.
love.physics.newRectangleShapeShorthand for creating rectangular PolygonShapes.
love.physics.newRevoluteJointCreates a pivot joint between two bodies.
love.physics.newWorldCreates a new World.

See Also


Other Languages