Hey all,
In my script, there is OnCollisionStay function, and it supposed to count to 2 then destroy the object.
But when i check in editor, time only counts for 0.3 then stops.
private void OnCollisionStay(Collision other)
{
if(other.gameObject.name == "egg")
{
collisionTime += Time.deltaTime;
if(collisionTime > 1)
{
Destroy(gameObject);
}
}
}
When I try with collisionTime > 0.25, it works cause it counts up to 0.3.
Is there anything i’m doing wrong here?