Constant scaling when touching object

Hello :slight_smile:

I would like to increase the players size constantly whenever they are touching a specific object. I can get the player to shrink but not grow . the player only grows every time i touch the object again.

this is my code for the shrink

void ShrinkBall()
{
transform.localScale -= new Vector3(0.1f, 0.1f, 0.1f);
print (“Shrink”);
}

this is my code to grow

void GrowBall()
{
transform.localScale += new Vector3(0.1f, 0.1f, 0.1f);
print (“Grow”);
}

note sure what the problem is.

thanks

I think this is less of a problem with the ShrinkBall() and Growball() functions and more of an issue with the calling of them. Are you using OnColliderStay() for the GrowBall() method?