Search Unity

UFPS + LWRP: Weapon Camera Issue

Discussion in 'General Graphics' started by Xander-Davis, Nov 24, 2019.

  1. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Hi!

    I'm experimenting with converting my UFPS game from the regular Core RP to the Lightweight Render Pipeline (LWRP). This seems to work very well so far except the Weapon Camera doesn't merge with the main FPS Camera. If I turn the Weapon Camera's Camera component off, then it looks fine but obviously the weapon isn't there.



    ^^^ Weapon Cam's camera component on.



    ^^^ Weapon Cam's Camera component off.

    Any ideas? I've poked every toggle on these cameras I could find but nothing seems to help. I really hope the LWRP can pull off having a weapon camera with UFPS or I might not be able to use the pipeline.

    Thanks for your help!
     
  2. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    LWRP do not support camera stacking. For FPS weapon rendering you need to use custom render pass:
     
    Xander-Davis likes this.
  3. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Thanks! I'll dig into this and hopefully get it working with UFPS.
     
  4. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Got it to work-- a fairly straightforward, easy, and simple change. :)

    However the only problem is now the gun goes through walls. Before, UFPS would push the gun back if pressed up against colliders and apparently it's not doing this now or whatever trick was present isn't functioning in this new alternative LWRP weapon setup view.

    Anyone have any advice for how to mitigate this?
     
  5. iamold21

    iamold21

    Joined:
    Aug 5, 2014
    Posts:
    2
    hey man, can you show me how did you change the setting since i been watching that video above for hour and still going nowhere (maybe its just me), the game still renders a blue background.
    And for the gun clipping maybe check this video to see if it help
     
    Xander-Davis likes this.
  6. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Super busy at the moment but if I get a minute I'll try to run through it. Really, there's not much more I would say other than what's in the video, as I just followed it step by step. Thanks for the other video though!

    Btw, we just shipped the update to VAST this weekend that converted the game over to the LWRP! https://www.astrogun.com/2020/01/04/vast-update-1-2-0-patch/
     
  7. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441