Godot Version
Godot 4.3
Question
` In my current project, I’m trying to make it so the players gun doesn’t clip through the wall when they get to close, as seen here:
I’ve seen a few methods to do this, but both seem to have problems. The first method involves using sub viewports, as seen in this video,
However, this ends up causing the guns to not react to the shadows from the world, which apparently wasn’t a problem in Godot 3, but now is in Godot 4.
The next method is using a shader, as seen here,
However, this method does technically “work”, it ends up changing the size and position of the models, and also causes the gun and the hand to not render correctly, as seen in these pictures:
I’m wondering what I have to do to overcome these issues and implement either of these methods. Any help is greatly appreciated.
Thanks.
`