collision detection[zombie game] -
05-31-2011, 08:45 AM
hey all, ive been trying to program a game which involves the player moving the camera as they attack three zombies with a pool cue however when i press the pool cue attack button the zombie just continues moving as it is meant to. any help would be appreciated, only have two weeks left to complete this
Your collision method is not called within the world, so you can't make them move backward even if you are that close to them. Unless you meant the collision method to be within the movement method, in which .05 meters is probably too little to be called. Try increasing the distance. Also, once you move away from them, they are going to start moving again, so you are goin to need to find a way, probably using a while statement, to make them stop moving permanently once the poker hits them.
--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes
Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade
Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ