O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other Collision Commands

Before leaving collisions, there are a few other pieces of code that you should become familiar with. Throughout this chapter, we have been using the CountCollisions command to detect when a collision occurs, but there are other collision commands that you can use as well:

EntityCollided(entity,type)—This command will tell Blitz3D what other object was involved with the entity that you specified.

CollisionX(entity,index), CollisionY(entity,index), CollisionZ(entity, index)—These commands will produce the x, y, and z coordinates for the location of a collision.

CollisionEntity—This command will tell Blitz3D what other object was involved with the entity that you specified.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required