My code to detect left mouse click is not working Input.GetMouseButtonDown(0) and Input.GetMouseButtonUp(0). But same code for Input.GetMouseButton(0) is working.
Code:
void FixedUpdate()
{
#if UNITY_ANDROID
mouseWorldPos = Camera.main.ScreenToWorldPoint(Input.mousePosition + new Vector3(0, 0, 4f));
mouseCameraOffset = bowlingBall.position - mouseWorldPos;
if (Input.GetMouseButtonDown(0))
{
Debug.Log("last");
lastMousePos = Input.mousePosition;
}
No comments:
Post a Comment