|
|
@@ -587,7 +587,9 @@ public class GamingManager : MonoBehaviour
|
|
|
}
|
|
|
else // If game is started and not paused, shoot a arrow
|
|
|
{
|
|
|
- Vector3 direction = Cam.ScreenToWorldPoint(AimingCross_img.GetComponent<RectTransform>().position);
|
|
|
+ Vector3 screenPoint = AimingCross_img.GetComponent<RectTransform>().position;
|
|
|
+ screenPoint.z = 1;
|
|
|
+ Vector3 direction = Cam.ScreenToWorldPoint(screenPoint);
|
|
|
FireArrow(speed * ArrowSpeedMultiplier, direction , true);
|
|
|
}
|
|
|
}
|
|
|
@@ -603,9 +605,7 @@ public class GamingManager : MonoBehaviour
|
|
|
}
|
|
|
private void UpdateCrossHairPosition(Vector2 position)
|
|
|
{
|
|
|
- Vector3 screenPoint = position;
|
|
|
- screenPoint.z = 1;
|
|
|
- if (AimingCross_img) AimingCross_img.transform.position = screenPoint;
|
|
|
+ if (AimingCross_img) AimingCross_img.transform.position = position;
|
|
|
}
|
|
|
|
|
|
private void MouseFireArrow(Vector3 screenPos)
|