private void OnCornerEnterHandler(CoverComponent.Side fromSide) { if (cornerCoroutine != null) { StopCoroutine(cornerCoroutine); } Vector3 newCamPosition = pivotStartLocalPosition + new Vector3(fromSide == CoverComponent.Side.RIGHT ? -aroundCornerOffset : aroundCornerOffset, 0, 0); // 'x' axis is negative when we're in the 'right' corner because the pivot is rotated 180 degrees by default, so axis values are inverted. cornerCoroutine = SetAroundCornerView(newCamPosition); StartCoroutine(cornerCoroutine); }
private void OnCornerEnterHandler(CoverComponent.Side fromSide) { // Displays crosshair. Debug.Log("Entered!"); crosshair.gameObject.SetActive(false); }