Question by
DeliciousGoblin · May 17, 2018 at 04:20 PM ·
2dspritesontriggerenterspriterendererchild object
Set SpriteRenderer of Child Objects on and off
I've created a 2D Jack-In-the-Box. It's spring is a series of sprites stacked on top of each other. It goes up and down with the head, and is visible when it goes past the bottom of the box. I would like to set an OnTriggerCollision in the box that disables the SpriteRenderer of the spring components off when it passes through it, and another above that collider that turns the SpriteRenderer of the spring back on as it exits the box. How should I go about doing that?
Comment