GLBasic forum

Main forum => GLBasic - en => Topic started by: David G on 2008-Jun-02

Title: Question about SPRCOLL()
Post by: David G on 2008-Jun-02
I was wondering whether the function SPRCOLL() detects collisions in the transparent parts of a sprite.

So if i were to load this sprite:(http://img159.imageshack.us/img159/47/cornertw2.png)

would the magenta areas be included in the collision checking or just the black areas?

Thanks
Title: Re: Question about SPRCOLL()
Post by: Moru on 2008-Jun-03
If you place the cursor on the command and press F1 you get the helpfile for that command. It says that it's pixel based collision so I guess it will not detect collision with the transparent part of your sprites. It also says that SPRCOLL does automatically a BOXCOLL with the sprite before for speed reasons so I think we can safely assume that SPRCOLL is a pixel based collision and BOXCOLL only checks the sprites size.