コード例 #1
0
    // Latepdate ensures that the object doesn't lag behind the user's head motion
    void Update()
    {
        FOVEInterface.EyeRays rays = FOVEInterface.GetEyeRays();

        // TODO: calculate the convergence point in FOVEInterface

        // Just hack in to use the left eye for now...
        transform.position = rays.left.GetPoint(10.0f);
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (FOVEInterface.IsLookingAtCollider(my_collider))
     {
         gameObject.GetComponent <Renderer> ().material.color = Color.red;
         //bool check = FOVEInterface.IsLookingAtCollider(my_collider);
     }
     else
     {
         gameObject.GetComponent <Renderer> ().material.color = Color.white;
     }
 }