Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using OnTriggerEnter2D #2

Open
serbemas opened this issue Oct 30, 2016 · 3 comments
Open

Problem using OnTriggerEnter2D #2

serbemas opened this issue Oct 30, 2016 · 3 comments

Comments

@serbemas
Copy link

serbemas commented Oct 30, 2016

Hi,

I'm using the explode() effect when a flower pot falls to the ground.

The problem is that some new parts penetrate the ground. This doesn't occurs when I use the explodeOnClick() script. Can you explain me why occurs this?

I'm also interested in delete the new gameObjects generated. How can I do this?

Regards.

@mjholtzem
Copy link
Owner

Sorry it's been so long to get a response. I will try to look at this this weekend and get back to you.

Can you clarify what you mean by wanting to delete new gameObjects generated? When do you want them to get deleted?

@serbemas
Copy link
Author

My job is to do a flowerpot that falls to the ground. So, first the flowerpot break into a small pieces and after X seconds I want to remove the new pieces

@koosemose
Copy link

I don't know if you still need to accomplish this, but on the off chance you do, I accomplished this by adding a script to the subpieces (they're created as GameObjects under the original sprite), this script basically counts down for a set amount of time in Update, and when it reaches 0, deletes the game object. Though actually for my particular use I'm also fading it out then deleting it at 0 alpha.

This may not be the most performant way to do things, but I don't notice any significant performance hits over what exploding lots of objects at once already does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants