GLBasic User Manual

Main sections

ANIMCOLL()

col% = ANIMCOLL(ani1%,tile1%, x1%,y1%, ani2%,time2%, x2%,y2%)



Performs a per-pixel collision check of 2 animated sprites. The check is performed as if you were comparing the results of:
DRAWANIM(ani1,tile1,x1,y1)
and
DRAWANIM(ani2,tile2,x2,y2)
for overlapping pixels.

The collision detection can handle mixing animated sprites and normal sprites. If ani1 or ani2 are not an animation but an image created with LOADSPRITE/GRABSPRITE, then tile1 or tile2 (respectively) should be set to 0 as they are not relevant.

See also...