Contact (Русский)

Контакты объектов нужны для управления пересечениями объектов.

Функции

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: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.

Смотрите также

Другие языки

Personal tools