Search Unity

Bug: Pointer raycast is performed even if pointerType == PointerType.None

Discussion in 'Input System' started by julcreutz, Aug 17, 2022.

  1. julcreutz

    julcreutz

    Joined:
    May 4, 2021
    Posts:
    22
    The InputSystemUIInputModule performs pointer raycasts at screen space position (0, 0) when using a gamepad.

    I've ran into this issue today where I was testing gameplay UI navigation. I have an interactable UI element in the bottom left corner of the screen and it was constantly being in the hovered state, even though I'm using a gamepad and of course it should not raycast at all.

    This happens independantly of what action is assigned to the "Point" field.

    Code (CSharp):
    1. // Raycast from current position.
    2. eventData.pointerCurrentRaycast = PerformRaycast(eventData);
    Shouldn't this piece of code account for the fact that pointerType could be PointerType.None, thus skipping the raycast?