Difference between revisions of "love.physics"

(Types)
Line 8: Line 8:
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
}}
+
Можно моделировать 2D жесткой физике тела в реалистической манере. Этот модуль основан на Box2D, и это API соответствует Box2D API, насколько это возможно.
 +
 
 +
Love.physics не легкая, и даже отдаленно не прост в использовании. Его десять-Ton Hammer предназначен для тяжелых подъемных (er. .. молоток ... подъема?).
 +
 
 +
Если вы просто пытаетесь сделать характер прыгать на блоки или любит, то двигаться вперед, не на что смотреть здесь.}}
 +
 
 
== Functions ==
 
== Functions ==
 
{{#ask: [[Category:Functions]] [[parent::love.physics]]
 
{{#ask: [[Category:Functions]] [[parent::love.physics]]

Revision as of 17:12, 10 December 2010

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.

O.png Love.physics is not lightweight, and not even remotely simple to use. Its a ten-ton hammer designed for heavy-lifting (er...hammer...lifting?).

If you are just trying to make a character jump around on blocks or the likes, then move along, nothing to see here.

 


Types

Body, Contact, Fixture, Joint, Shape, World

Functions

love.physics.getDistanceReturns the two closest points between two fixtures and their distance.
love.physics.getMeterReturns the meter scale factor.
love.physics.newBodyCreates a new body.
love.physics.newChainShapeCreates a new ChainShape.
love.physics.newCircleBodyCreates a new Body with an attached CircleShape.
love.physics.newCircleShapeCreates a new CircleShape.
love.physics.newDistanceJointCreates a DistanceJoint between two bodies.
love.physics.newEdgeShapeCreates a new EdgeShape.
love.physics.newFixtureCreates and attaches a fixture.
love.physics.newFrictionJointA FrictionJoint applies friction to a body.
love.physics.newGearJointCreate a GearJoint connecting two Joints.
love.physics.newMotorJointCreates a joint between two bodies which controls the relative motion between them.
love.physics.newMouseJointCreate a joint between a body and the mouse.
love.physics.newPolygonBodyCreates a new Body with an attached PolygonShape.
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.newRectangleBodyCreates a new Body with an attached rectangle PolygonShape.
love.physics.newRectangleShapeShorthand for creating rectangular PolygonShapes.
love.physics.newRevoluteJointCreates a pivot joint between two bodies.
love.physics.newRopeJointCreates a joint between two bodies that enforces a max distance between them.
love.physics.newWeldJointA WeldJoint essentially glues two bodies together.
love.physics.newWheelJointCreates a wheel joint.
love.physics.newWorldCreates a new World.
love.physics.setMeterSets the meter scale factor.

See Also

Other Languages