One type of collision you’ll want to create often is having one object disappear when it hits another. This is perfect when you create things like bullets that hit enemies, since you’ll want the enemies to disappear. We’ll keep things simple in this example. We’ll have one object (a cone) disappear when it is hit by a sphere. Demo11-04.bb shows how to do this. This program controls a sphere that can collide with a cone. When you run the program, you’ll see that you can control the sphere, but it can’t go through the cone since a collision has been created. The following code makes the disappearing occur!
; This following code makes our program run While Not KeyDown( 1 ) x#=0 y#=0 z#=0 If KeyDown( 203 )=True ...
No credit card required