Skip to main content
Post Closed as "Not suitable for this site" by CommunityBot
Rollback to Revision 6
Source Link
user1430
user1430

I get errors whenam encountering an extremely absurd phenomenon. When I run this code: on my smartphone Input.GetMouseButtonDown (0).position because apparentlyvia Unity Remote or even on the computer, it does not existworks as expected. How canBut when I detectinstall the position ofAPK on the mouse press?

I want to publish for smartphonesdevice and run it, the touch devices so I can't use Input.mousePositiondistance changes! Does this have something to do with resolution and Vector3.Distance?

 distance = Vector3.Distance (Input.mousePosition, button.position); Debug.Log (distance); if (Input.GetMouseButton (0) && distance > 55) { // do something } 

I get errors when I run this code: Input.GetMouseButtonDown (0).position because apparently it does not exist. How can I detect the position of the mouse press?

I want to publish for smartphones, touch devices so I can't use Input.mousePosition

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote or even on the computer, it works as expected. But when I install the APK on the device and run it, the touch distance changes! Does this have something to do with resolution and Vector3.Distance?

 distance = Vector3.Distance (Input.mousePosition, button.position); Debug.Log (distance); if (Input.GetMouseButton (0) && distance > 55) { // do something } 
Rollback to Revision 4
Source Link

I am encountering an extremely absurd phenomenon. Whenget errors when I run this code on my smartphone: via Unity Remote,Input.GetMouseButtonDown (0).position because apparently it works as expecteddoes not exist. But whenHow can I install the APK ondetect the device and run it,position of the touch distance changes! Does is have something to do with resolution and Vector3.Distancemouse press?

 if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) { distance = Vector3.Distance (Input.GetTouch (0).position, characterButton.position); } Debug.Log (distance); if (Input.GetMouseButton (0) && Time.timeScale != 0 && distance > 55) { // do something } 

I want to publish for smartphones, touch devices so I can't use Input.mousePosition

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote, it works as expected. But when I install the APK on the device and run it, the touch distance changes! Does is have something to do with resolution and Vector3.Distance?

 if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) { distance = Vector3.Distance (Input.GetTouch (0).position, characterButton.position); } Debug.Log (distance); if (Input.GetMouseButton (0) && Time.timeScale != 0 && distance > 55) { // do something } 

I get errors when I run this code: Input.GetMouseButtonDown (0).position because apparently it does not exist. How can I detect the position of the mouse press?

I want to publish for smartphones, touch devices so I can't use Input.mousePosition

Rollback to Revision 5
Source Link

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote or even on the computer, it works as expected. But when I install the APK on the device and run it, the touch distance changes! Does thisis have something to do with resolution and Vector3.Distance?

 if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) {  distance = Vector3.Distance (Input.mousePositionGetTouch (0).position, buttoncharacterButton.position);  }  Debug.Log (distance); if (Input.GetMouseButton (0) && Time.timeScale != 0 && distance > 55) { // do something } 

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote or even on the computer, it works as expected. But when I install the APK on the device and run it, the touch distance changes! Does this have something to do with resolution and Vector3.Distance?

 distance = Vector3.Distance (Input.mousePosition, button.position); Debug.Log (distance); if (Input.GetMouseButton (0) && distance > 55) { // do something } 

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote, it works as expected. But when I install the APK on the device and run it, the touch distance changes! Does is have something to do with resolution and Vector3.Distance?

 if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) {  distance = Vector3.Distance (Input.GetTouch (0).position, characterButton.position);  }  Debug.Log (distance); if (Input.GetMouseButton (0) && Time.timeScale != 0 && distance > 55) { // do something } 
deleted 102 characters in body
Source Link
Loading
added 254 characters in body
Source Link
Loading
added 89 characters in body
Source Link
Loading
deleted 33 characters in body
Source Link
Loading
added 67 characters in body
Source Link
Loading
Source Link
Loading