FOVE SUPPORT CENTER

research programmer

Answered

Comments

2 comments

  • Avatar
    Riz

    Hi Lindsey,

     

    You can use the Unity method "Input.GetMouseButtonDown" as an If-statement in your code, to detect mouse clicks. 

    Example:

    using UnityEngine;
    using System.Collections;

    public class ExampleClass : MonoBehaviour
    {
    void Update()
    {
    if (Input.GetMouseButtonDown(0))
    Debug.Log("Pressed primary button.");

    if (Input.GetMouseButtonDown(1))
    Debug.Log("Pressed secondary button.");

    if (Input.GetMouseButtonDown(2))
    Debug.Log("Pressed middle click.");
    }
    }

    Similarly, if you want to detect a key press, you can use the "(Input.GetKeyDown("KeyCode.Put the letter here"));

    Cheers!

    2
    Comment actions Permalink
  • Avatar
    Lindsey Yang

    Hi Riz,

    Thank for your previous reply. 

    I looked at the FOVE/bin/ directory, and found there is a EyeTracking.dll. Could you give me some instruction how to call this dll to retrieve Eyetracking information like left eye x/y/z and right eye x/y/z?

    Thank you so much,

     

    Lindsey

     

    0
    Comment actions Permalink

Please sign in to leave a comment.