When the first person arms and items are drawn to the screen they are drawn using a second camera (called camera stacking). This prevents the objects from clipping with walls that are in front of the character. This works well for the standard pipeline, but the lightweight render pipeline does not support camera stacking so another solution needs to be used.

Beginning in Unity 2019.2 you can change the camera’s Renderer Type to change the order that the objects are rendered. The Ultimate Character Controller uses this method to ensure the first person arms and items do not clip with other objects. The following steps need to be performed in order to use this method:

  1. Setup your project to use the lightweight render pipeline.
  2. Import the lightweight render pipeline integration package (links below).
  3. Change the camera’s Render Type to Custom and set the Renderer Data to OverlayForwardRendererData:
  4. On the Camera Controller change the First Person View Type change the Overlay Render Type to Render Pipeline:
  5. To prevent duplicate shadows ensure Cast Shadows is set to Off for all of the Renderers on the first person objects. For example, with the example character you’ll want to ensure Cast Shadows is set to Off for all of the objects underneath the Nolan/First Person Objects GameObject.
  6. On your character’s Perspective Monitor the Invisible Material should be set to the InvisibleShadowCastorLWRP material included in the download.
  7. If you are using the Object Fader component set the Color Property Name to “_BaseColor”.

Downloads

Ultimate Character Controller
First Person Controller
UFPS: Ultimate First Person Shooter
UFPM: Ultimate First Person Melee