PixelPAD 2D - collision

get_collision(obj: gameobject, filter: str or gameobject) -> gameobject or bool

Example
Description
Checks whether the game object obj is colliding with any of the objects matched by filter.
Parameters
obj
The game object to check collisions for.

filter
Objects to check for collision with. If a single game object is passed, checks only that game object. If the name of a game object asset is passed, checks against all objects which are instances of that asset.

Return
The first game object that obj is colliding with if there is a collision, False otherwise.

Collisions

Collision is when two GameObjects touch. PixelPAD2D defines the area of which an object can collide via their sprite's width and height.
Company
Resources
Contact Us