示例#1
0
    void Update()
    {
        if (!isWatched)
        {
            return;
        }

        // Set up cursor mode
        if (interactiveObject.CanInteract())
        {
            if (GvrPointerInputModule.CurrentRaycastResult.distance <= maxDistance)
            {
                // Set cursor to can interact
                VRCursor.SetState(VRCursor.CursorState.CAN_INTERACT);
            }
            else
            {
                // Set cursor to too far to interact
                VRCursor.SetState(VRCursor.CursorState.TOO_FAR);
            }
        }
        else
        {
            // Set cursor to can't interact
            VRCursor.SetState(VRCursor.CursorState.CANNOT_INTERACT);
        }
    }
示例#2
0
 public override bool CanInteract()
 {
     return(!isMoving && controlledObject.CanInteract());
 }