Hey, guys! I have a problem with my fps game. I have a gun parents to the camera. When I go near a wall, the gun mesh goes through the wall. Can u help me solve this problem. Thx in advance!
1 Answer
1There are a couple of solutions:
- Set up another camera that only sees the weapon and render it on top of your Main Camera. *
- Write your own shader that renders on top of everything else. *
- Implement a behavior (via scripting) for the weapon when it collides with an object, typical solutions is that the character aim upwards or sideways.
*Will make the gun look small when standing right in front of the wall.
I tried the first solution. Working on it for a while, and the problem is solved!!!! ^^ !!!! Thanks, man!!!! :)
– henry96