Nick
02-24-2007, 09:34 PM
Hello I hope someone here can help. I see a few other threads on collision and I thought I had it figured out after examining the flight simulator code with the rings, but I am using the same method as it and it is not working like I wanted it to.
In my attached program I have a tank that shoots a bullet when the user presses space. The bullet moves forward a set amount and then comes back to the tank. If the user aims right, it will go through a car. Also the car is always moving forward. I am using if {bullet} is within {5 meters} of {car} to detect a collision, but when shooting the bullet through the car this fails to trigger the expected action. What is strange is if I position the tank in front of the car and let the car run through the tank & bullet then the collision is detected.
I can't figure out why it works when the bullet is sitting still and does not work when the bullet moving. Is there something I'm missing?
In my attached program I have a tank that shoots a bullet when the user presses space. The bullet moves forward a set amount and then comes back to the tank. If the user aims right, it will go through a car. Also the car is always moving forward. I am using if {bullet} is within {5 meters} of {car} to detect a collision, but when shooting the bullet through the car this fails to trigger the expected action. What is strange is if I position the tank in front of the car and let the car run through the tank & bullet then the collision is detected.
I can't figure out why it works when the bullet is sitting still and does not work when the bullet moving. Is there something I'm missing?