|
|
@@ -67,7 +67,7 @@ public class CrossHair : MonoBehaviour
|
|
|
|
|
|
#region 固定相机更新
|
|
|
RectTransform _parentRTF;
|
|
|
- public RectTransform parentRTF {
|
|
|
+ RectTransform parentRTF {
|
|
|
get {
|
|
|
if (!_parentRTF) {
|
|
|
_parentRTF = transform.parent.GetComponent<RectTransform>();
|
|
|
@@ -78,6 +78,7 @@ public class CrossHair : MonoBehaviour
|
|
|
Vector3 centerPoint = new Vector3(0.5f, 0.5f, 0);
|
|
|
Vector3 targetPosition;
|
|
|
public void UpdatePostionWhenFixedCamera() {
|
|
|
+ if (!visiable) return;
|
|
|
Transform transform = BowCamera.ins.transform;
|
|
|
Ray ray = new Ray(transform.position, transform.forward);
|
|
|
RaycastHit hitInfo;
|