相机移动bug
This commit is contained in:
parent
965bc503d5
commit
e7d9b0dd5e
@ -18,6 +18,7 @@ public class DragTheScreen : MonoBehaviour, IDragHandler
|
|||||||
{
|
{
|
||||||
if (isscanmove)
|
if (isscanmove)
|
||||||
{
|
{
|
||||||
|
|
||||||
Player.GetComponent<PlayerMovement_Jpystick>().HandleViewSwipe();
|
Player.GetComponent<PlayerMovement_Jpystick>().HandleViewSwipe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,13 +136,13 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
|||||||
}
|
}
|
||||||
public void HandleViewSwipe()
|
public void HandleViewSwipe()
|
||||||
{
|
{
|
||||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 315 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 45)
|
if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 270 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 90)
|
||||||
{
|
{
|
||||||
|
cameraControl.ResetTargetOffsets();
|
||||||
}
|
}
|
||||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) < 315 && Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) > 45)
|
if (Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) < 300 && Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) > 60)
|
||||||
{
|
{
|
||||||
|
cameraControl.ResetTargetOffsets();
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -47,6 +47,7 @@ public class UseSkill : MonoBehaviour
|
|||||||
float dis= Vector3.Distance(GameObject.Find("player").transform.position, XFS.instance.transform.position);
|
float dis= Vector3.Distance(GameObject.Find("player").transform.position, XFS.instance.transform.position);
|
||||||
if (dis >= 30f)
|
if (dis >= 30f)
|
||||||
{
|
{
|
||||||
|
|
||||||
Drop();
|
Drop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user