/// <summary> /// Returns the camera's position or the controller's or weapons' if the player is /// holding a weapon that has a flashlight (and by an extension a lasersight) /// </summary> /// <returns></returns> public static Vector3 GetVRInteractionFromPosition() { if (ItemEquippableEvents.CurrentItemHasFlashlight()) { return(Controllers.GetAimFromPos()); } else { return(Hmd.transform.position); } }
/// <summary> /// Returns the camera's forward or the controller's or weapons' if the player is /// holding a weapon that has a flashlight (and by an extension a lasersight) /// </summary> /// <returns></returns> public static Vector3 GetVRInteractionLookDir() { if (ItemEquippableEvents.CurrentItemHasFlashlight()) { return(Controllers.GetAimForward()); } else { return(Hmd.transform.forward); } }