Search Unity

WebGL Misplaced/Bugged colliders

Discussion in 'Web' started by PavlekZG, Jan 21, 2020.

  1. PavlekZG

    PavlekZG

    Joined:
    Jun 29, 2018
    Posts:
    1
    Hello, a quick question.

    Due to the requirements of the project I am currently working on, I have to build my game for WebGL. The game works properly both in Editor and the PC build, however, some colliders don't seem to be working properly when the game is built for WebGL.

    EDIT:
    After some test and trial, I have reason to believe this is happening because when I click on the WebGL window and my cursor disappears, it actually gets locked in a position that is not center of the screen.

    How can I prevent this from happening?

    You can see my issue visualized in the following image: (cursor is located within right image marked area instead of the center of the screen)



    I am out of ideas... Any help or suggestion will be highly appreciated.
     
    Last edited: Jan 21, 2020