I need an object to have no collision with the player while is is being scaled.
This is because while it is growing, it is causing to launch the player.
I have tried using :
if(transform.localScale.x < 1 && Growing)
{
transform.localScale.x += GrowTime;
transform.localScale.y += GrowTime;
transform.localScale.z += GrowTime;
Physics.IgnoreCollision(gameObject.FindWithTag("Player").transform.collider , this.collider);
}
while the variable growing is set to true.
But once it is set to false, the player can still not collide with the Object.
Is there any way to make the object start checking for collision again once growing is set to false?