FabGL
ESP32 Display Controller and Graphics Library

◆ detectCollision() [1/2]

Sprite * detectCollision ( Sprite sprite,
bool  removeCollidingSprites = true 
)

Detects first collision with the specified sprite.

It is necessary to call CollisionDetector.update() before detectCollision() so sprites position and size are correctly updated.

Parameters
spriteThe sprite to detect collision.
removeCollidingSpritesIf true the collided sprites are automatically removed from the collision detector.
Returns
The other sprite that collided with the specified sprite.

Definition at line 427 of file collisiondetector.cpp.