// Update is called once per frame
 void Update()
 {
     ManagerOrientText.text   = toFomattedString(FoveManager.GetHmdRotation().value);
     ManagerPosText.text      = toFomattedString(FoveManager.GetHmdPosition(false).value);
     ManagerGazeText.text     = toFomattedString(FoveManager.GetHmdCombinedGazeRay().value.direction);
     InterfaceOrientText.text = toFomattedString(fove.transform.rotation);
     InterfacePosText.text    = toFomattedString(fove.transform.position);
     InterfaceGazeText.text   = toFomattedString(fove.GetCombinedGazeRay().value.direction);
 }
示例#2
0
    // Update is called once per frame
    void FixedUpdate()
    {
        var obj = FoveManager.GetGazedObject().value;

        if (obj == null)
        {
            return;
        }

        var rbody = obj.GetComponent <Rigidbody>();

        if (rbody == null)
        {
            return;
        }

        var gazeRay = fove.GetCombinedGazeRay().value;

        rbody.AddForce(25 * gazeRay.direction);
    }