love.physics (Español)

Available since LÖVE 0.4.0
This module is not supported in earlier versions.

Puede simular 2D rigid bodies (cuerpos rigidos 2D) de manera realista. Este módulo es esencialmente un vínculo a Box2D (version 2.3.0 - manual). Para mas simples (y mas comunes) usos, existen una pequeña cantidad de librerías, que suelen ser más popularmente usadas que love.physics y se puede encontrar aquí: https://github.com/love2d-community/awesome-love2d#physics

Tipos

Body Bodies are objects with velocity and position.
Contact Contacts are objects created to manage collisions in worlds.
Fixture Fixtures attach shapes to bodies. Added since 0.8.0
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.

Funciones

love.physics.getDistance (Español) Retorna los dos puntos mas cercanos entre dos fixtures y su distancia. Added since 0.8.0
love.physics.getMeter (Español) Retorna el factor de escala del metro. Added since 0.8.0
love.physics.newBody (Español) Crea un nuevo cuerpo (Body)

Enums

BodyType The types of a Body.
JointType Different types of joints.
ShapeType The different types of Shapes, as returned by Shape:getType.

Notas

Box2D arquitectura, conceptos, y terminologías.

Box2D basic overview.png

Ver También



Otros Idiomas