Francesco Alotto

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9428
    Francesco Alotto
    Participant

    Thank you,

    I’ve solved.

    Regards,
    Francesco

    #9427
    Francesco Alotto
    Participant

    Hello,
    Can I please have it too?

    Thank you,
    Frank

    #9345
    Francesco Alotto
    Participant

    Thank you for the fast answer…

    My objective is to trigger an UI Button contained into a Canvas.
    In my code I’ve:
    cursor.transform.position = new Vector2(smoothedpoint.x,smoothedpoint.y);

    Where cursor is an image that give information about the points where the user is looking.

    If the cursor stay over a button for more than 2 seconds, I want to trigger the button action.

    I’ve tried to use Raycast on void Update() function:
    `PointerEventData pointerData = new PointerEventData(EventSystem.current);
    pointerData.position = position;
    List<RaycastResult> results = new List<RaycastResult>();

    EventSystem.current.RaycastAll(pointerData, results);
    print(results[0].ToString());`

    But I don’t know how to achieve the timebased event. Using the mouse cursor, I’ve used the IPointerEnterHandler, IPointerExitHandler to set a boolean value to start the timer.

    Could you please help?

    I think that this solutions could be useful to a lot of users,

    Thank you,

    Francesco

    #9336
    Francesco Alotto
    Participant

    Sorry,
    I have posted in the wrong section…. The SDK is Unity SDK.. The hardware is Tobii Steelseries Santry

Viewing 4 posts - 1 through 4 (of 4 total)