I have a 3D rigged player model which is a child of my “Player” object. It has left and right shoulders, arms, hands, fingers, legs, spine, etc.
I have two cameras, one is my Main Camera and the other is just to render my weapons and hands. I have depth, clear flags and culling masks correctly set up including the appropriate layers to use/not to use, but I’m running into issues.
When I move my mouse up or down to the clamp limits, my camera will clip into my player body/head. So I changed the layer of the entire player mesh including all child objects to “Player”. Then I went into both hands, and changed both hands + fingers to “Hands” layer.
Then I set my separate gun objects to “Weapon” layer. But if I try to adjust the culling mask appropriately so that only Weapon + Hands can be viewed by the weapon camera, the entire player mesh disappears including the hands and the gun just floats.
Is this because although my hands are on a different layer to the rest of the mesh object, since they’re children objects, the culling mask won’t work properly?
The only solution I can think of is to duplicate my hands but I read it could be performance intensive. Is there a solution here?
Depth for Main Camera is 0, and 1 for Weapon Camera. Clear Flags for Weapon Camera is Depth only. Both cameras use default layers (but I also tested with the layers above) and my hands and fingers are correctly set to “Hands”.