Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug ScreenPointToRay() gives weird results when using a camera with RT on some dual screen setups

Discussion in 'Editor & General Support' started by TheFalconeerDev, Apr 1, 2023.

  1. TheFalconeerDev

    TheFalconeerDev

    Joined:
    Sep 18, 2019
    Posts:
    95
    ScreenPointToRay() gives weird results when using a camera with RT on some dual screen setups.
    Also screen.currentresolution and the screen.getresolutions list give odd outcomes (likely related) for some players of my game that have dual screens. I outputted it to the screen for them and some get half their native resolution or double their native resolution someone got a height of 2000 pixels???

    this issue did not happen with the Falconeer which is in 2019 this is in the latest 2021 LTS. Same codebase, likely then something went belly up in a recent '21 patch.

    I have no steps to reproduce as my setup with dualscreens does not suffer this issue, nor at the publisher.
    I have asked people if they had screenspanning software installed or DSR on. many responded no to both, most didn't even know what DSR was/did. One user had DSR and it could bork the resolution output indeed, others did not have DSR.

    That said one user could bork his outputted resolution simply by ingame changing the option from a resolution with 30hz to one with 60 hz. and changing it would give him a weird resolution as result.

    hope this helps. I've solved the mouse cursor issue (from the screenpointToRay by making a ghost camera that did not use an RT, this solved that, the resolution issues persist)

    kind regards,
    Tomas Sala
     
  2. TheFalconeerDev

    TheFalconeerDev

    Joined:
    Sep 18, 2019
    Posts:
    95
    A discord user shared this, this is from the Last Worker a just released game that also uses unity3d. Each of those screens is 1080p. How on earth can his resolution list contain a 3840x2160 resolution?

    so seems more games are having this issue