Hi there,
So recently I came up with a very simple idea that I don’t know how to implement, so I came here for some help. I am working on an FPS game and I’m trying to make my weapon not go through walls. I managed to ‘‘fix’’ this by moving my character back and not letting the weapon stick out of the collision capsule (I’m using the third person character in first-person view), but this creates another problem: the camera can go through walls sometimes, for example when looking up near a wall, because it goes out of the collision capsule.
I could ‘‘fix’’ this by setting a lower view pitch max for the follow camera but it doesn’t look good.
My idea is the following: I want to leave the character in its back position, so the weapon doesn’t stick out of the collision capsule and it never goes through walls, but make it so that when the player looks up, the character and the follow camera move forward, eliminating the possibility of the follow camera going through walls because it will always remain inside the collision capsule.
Any help is appreciated