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 navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
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
Pick Up The Gun
Gun goes through wall in a FPS
how to make a player die on collision