Search Unity

Input.simulateMouseWithTouches is ignored in WebGL

Discussion in 'Web' started by petrucio, Feb 25, 2016.

  1. petrucio

    petrucio

    Joined:
    Aug 30, 2011
    Posts:
    126
    I know WebGL is not officially supported on mobile devices, but this will also raise problems on ultra books with touch. Since this already works for other mobile platforms, it's expected to have the same functionality everywhere - at the very least we should be getting a warning when setting this.

    My solution was to use Raycasting on touches to send OnMouse events to objects that are expecting them, and change all Input.GetMouse*() calls to my own GetInput*() calls that check touches as well as mouse. But those should not be necessary, specially since multi-platform without too much special casing is supposed to be Unity's big thing.
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Could you file a bug with a simple test case? Then we will not forget about this and take a look at fixing this (should not be too difficult).
     
  3. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Well... It's one year later and this wasn't still solved.

    Any alternative to solve this easly?
     
  4. Logic_Bomb

    Logic_Bomb

    Joined:
    Apr 6, 2017
    Posts:
    16