Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Raycast not working well when switching to fullscreen in webplayer

Discussion in 'Scripting' started by KarloE, Jan 12, 2015.

  1. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    So, I am using Camera.main.ScreenPointToRay(Input.mousePosition); in order to pick up our objects from the floor.

    When I switch to fullscreen in webplayer, our raycasts get messed up, for example right now it reacts when I click near the object (to the left of it), but not directly on it.

    Not sure how to prevent this from happening and make the raycasts work as they should in that mode.

    Any ideas?
     
  2. battlespace

    battlespace

    Joined:
    Nov 1, 2009
    Posts:
    33
    I know it's been a few months, did you find a solution? My raycasts are working fine in windowed mode, but not fullscreen.