- Home /
The question is answered, right answer was accepted
Bullets getting stuck in air
Hi, I have a annoying problem with my bullets; whenever I fire my gun the bullets go off like normal, but some of them get stuck at either the players position, or a bit ahead of the players position. Does anyone know the cause of this?
are the bullets being put to sleep (rigidBody.sleep()), or are they supposed to be turned off (or even destroyed)?
what was causing them to move in the first place? (transform modification, or physics)
would it be possible for you to simplify your scripts (so that you can put them up) and they duplicate the error, and give a step-by-step instructions of how to duplicate this. I do not see enough information here to give a meaningful answer.
Answer by clunk47 · Aug 09, 2013 at 05:37 PM
Have a look at Physics.IgnoreCollision
Physics.IgnoreCollision(this.collider, other.collider);
That didn't really work, because my gun doesn't have a collider attached to it.
Then use IgnoreCollision so that bullets don't collide with other bullets, and so that bullets don't collide with your player's collider, if neccessary. You can also use IgnoreLayerCollision, so that bullets don't collide with anything on the same layer they're on.
Follow this Question
Related Questions
Best way to make a gun? 1 Answer
how to make my gun not fire while paused 2 Answers
How to add Bullet Velocity 1 Answer
how do i make a gun 1 Answer
Help with script 2 Answers