PDA

View Full Version : I Need help with fps game


Spartan 117
06-01-2013, 02:27 PM
So my game is about hunting dinosaurs. i have a gun that shoots a sphere at a target. i currently set up a method stating if the sphere is within 2 meters of trex it will turn red. The problem is even if you dont shoot the sphere and you are within 2 meters of the trex it turns red. How can you turn the trex red by only shooting it with the sphere.

MrMoke
06-01-2013, 05:30 PM
One option might be to create a Boolean variable that is only true if the sphere has been fired. You would then need to add a check to the collision routine so it only works if the sphere has been fired. Naturally, you have to reset everything when reloading.