Sprite Collision?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

Is there any in-built sprite collision commands in PB? i can't find any, if not how do others handle collision with sprites, is it with an invisible box or circle? How do you handle per-pixels collision with PB? any examples?

Thanks, :)

--Kale

New to PureBasic and falling in Love! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.

Have you even looked in the reference? Look under Sprite & Screen and you'll find SpriteCollision() (fast simple box collision detection) and SpritePixelCollision() (slower per pixel collision detection).

For example take a look at the source to Waponez (download from http://www.purebasic.com). Or take a look at the resource site, i think Paul have made the source to his helicopter shooter available there.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

DOH! soz i was prolly looking at sprite3d! :) thanks

--Kale

New to PureBasic and falling in Love! :)
Post Reply