2D Toolkit Forum

2D Toolkit => Support => Topic started by: Napoleon on June 27, 2015, 03:27:39 pm

Title: Make (animated) sprite invisible?
Post by: Napoleon on June 27, 2015, 03:27:39 pm
I can change the z-axis to somewhere behind the 2D scene. But what is the proper way to do this?

I have a projectile and it hits something, so I disable it's collision and want it to become invisible while the explosion sfx is playing. After that it is automatically destroyed.
Title: Re: Make (animated) sprite invisible?
Post by: unikronsoftware on June 28, 2015, 01:42:14 pm
You're just mixing behaviours here - the explosion should really be separate to the projectile, but if  you really want to do it this way you can disable the renderer on the object.
Title: Re: Make (animated) sprite invisible?
Post by: Napoleon on June 29, 2015, 12:05:41 pm
You are right. It's bad design. I should use a separate object for the explosion and clean up the projectile.