Duplicate Question: http://answers.unity3d.com/questions/39420/gun-goes-through-wall-in-a-fps.html
How can I make my gun not to go through walls.Also yes my gun already has a collider
Duplicate of: http://answers.unity3d.com/questions/39420/gun-goes-through-wall-in-a-fps.html
Answer by Dreave
Feb 25, 2012 at 07:33 PM
What Ive done is make the gun small and then make the character controller a bit wider so it covers the gun.
You mean the collision range wider, right?
extending the collider is the worst thing you could do. Learn about layers. they are much more usefull
Answer by Durante
Feb 25, 2012 at 05:48 AM
You need to setup a box collider around the gun but just behind the end of the barrel so that your projectiles can exit safely without being stoped by the Collider.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
9 People are following this question.
How to make it so only my player activates Trigger
Make wall partially transparent when player is behind it
How to add gun to the model, as when it animate, the gun is dis-positioned.
Pick Up The Gun
how to make a player die on collision