Difference between revisions of "Contact"
m (1 revision: Imported docs from potato.) |
|||
Line 1: | Line 1: | ||
− | + | Contacts are objects created to manage collisions in worlds. | |
== Functions == | == Functions == | ||
{{#ask: [[Category:Functions]] [[parent::Contact]] | {{#ask: [[Category:Functions]] [[parent::Contact]] | ||
Line 9: | Line 9: | ||
* [[parent::love.physics]] | * [[parent::love.physics]] | ||
[[Category:Types]] | [[Category:Types]] | ||
− | {{#set:Description=}} | + | {{#set:Description=Contacts are objects created to manage collisions in worlds.}} |
Revision as of 16:17, 14 February 2010
Contacts are objects created to manage collisions in worlds.
Functions
Contact:getChildren | Gets the child indices of the shapes of the two colliding fixtures. |
Contact:getFixtures | Gets the two Fixtures that hold the shapes that are in contact. |
Contact:getFriction | Get the friction between two shapes that are in contact. |
Contact:getNormal | Get the normal vector between two shapes that are in contact. |
Contact:getPosition | Get the location of the contact point between two shapes. |
Contact:getPositions | Returns the contact points of the two colliding fixtures. |
Contact:getRestitution | Get the restitution between two shapes that are in contact. |
Contact:getSeparation | Get the separation between two shapes that are in contact. |
Contact:getShapes | Gets the two Shapess that are in contact. |
Contact:getVelocity | Get the linear impact velocity of a contact. |
Contact:isEnabled | Returns whether the contact is enabled. |
Contact:isTouching | Returns whether the two colliding fixtures are touching each other. |
Contact:resetFriction | Resets the contact friction to the mixture value of both fixtures. |
Contact:resetRestitution | Resets the contact restitution to the mixture value of both fixtures. |
Contact:setEnabled | Enables or disables the contact. |
Contact:setFriction | Sets the contact friction. |
Contact:setRestitution | Sets the contact restitution. |
World:setCallbacks | Sets functions to be called when shapes collide. |