A weapon that can't hit anything isn't much good to us. In order to hit things, we need to use collision detection. Let's go ahead and add collision detection to our
MachineGun class so we can shoot some things in the scene.
from direct.interval.IntervalGlobal import * import random
__init__method as follows:
class Pop: def __init__(self, pos): rand = random.randint(1,3) self.pop = loader.loadModel( "../Models/Explosions/Laserburst" + ...