I have random spherical objects that spawn on the top of the screen (portrait), and they fall down with a random speed.
If i click on the collider when they are stationary, touch is perfect, but if i click when they fall down, touch is not accurate…
Why?
I use Update and i use a constant force and the gravity to push down the objects.
for (int i = 0; i < Input.touchCount; i++)
{
if (Input.touches_.phase == TouchPhase.Began || Input.touches*.phase == TouchPhase.Ended)*_
{
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay(Input.GetTouch(i).position);
if (Physics.Raycast(ray, out hit))
{
if (hit.collider.tag == “oggetto”)
{
Destroy(hit.collider.transform.parent.gameObject);;
}
}
}
}
,