Difference between revisions of "Contact"

(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
Contacts are objects created to manage collisions in worlds.
 
Contacts are objects created to manage collisions in worlds.
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Contact||Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::Contact||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==
[[Object]]
+
* [[parent::Object]]
 
== See Also ==
 
== See Also ==
 +
* [[parent::World:setCallbacks]]
 +
* [[parent::World:getContacts]]
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 
[[Category:Types]]
 
[[Category:Types]]

Revision as of 18:54, 20 November 2019

Contacts are objects created to manage collisions in worlds.

Functions

Contact:getChildren Gets the child indices of the shapes of the two colliding fixtures. Added since 0.9.0
Contact:getFixtures Gets the two Fixtures that hold the shapes that are in contact. Added since 0.9.2
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. Removed in 0.8.0
Contact:getPositions Returns the contact points of the two colliding fixtures. Added since 0.8.0
Contact:getRestitution Get the restitution between two shapes that are in contact.
Contact:getSeparation Get the separation between two shapes that are in contact. Removed in 0.8.0
Contact:getVelocity Get the linear impact velocity of a contact. Removed in 0.8.0
Contact:isEnabled Returns whether the contact is enabled. Added since 0.8.0
Contact:isTouching Returns whether the two colliding fixtures are touching each other. Added since 0.8.0
Contact:resetFriction Resets the contact friction to the mixture value of both fixtures. Added since 0.8.0
Contact:resetRestitution Resets the contact restitution to the mixture value of both fixtures. Added since 0.8.0
Contact:setEnabled Enables or disables the contact. Added since 0.8.0
Contact:setFriction Sets the contact friction. Added since 0.8.0
Contact:setRestitution Sets the contact restitution. Added since 0.8.0
Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
World:setCallbacks Sets functions to be called when shapes collide. Added since 0.8.0

Supertypes

See Also


Other Languages