Why isn't my pistol colliding with the wall?
Hello guys! So I have a first person player with CharacterController who collides just fine. But attached to the player is a camera and attached to the camera is a gun (for shooting script purposes) with a box collider (I don't like mesh colliders). However, whenever I run into a wall the player collides perfectly but the gun just goes right through. Why does this happen and how can I stop it? Thanks for the help!
Answer by SadSwede · Mar 11, 2016 at 01:44 AM
does the gun have to collide? there is different ways to make the gun appear to "not" collide with an object.
here is a tutorial on the solution i think is best for you, https://www.youtube.com/watch?v=RLzssixo7SE , it simply makes it so that your weapons doesn't appear to be clipping through a wall, when it actually does.
also having a collider infront of your characterController can cause problems with the collision/walking on the player.
Your answer
![](https://koobas.hobune.stream/wayback/20220612071323im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
collision problems 0 Answers
OnTriggerEnter 2 Answers
unity2d One Scene Not Working 0 Answers
Tilemap collider 2D not working 2 Answers
StartCoroutine in Collision unwork 1 Answer