ROODAY

How do I create particles when two bodies hit?

Recommended Posts

I saw the example labeled when particles collide, but it didn't have what I wanted. Let's say that in a game there is a ship and an asteroid. How would I make it so that when the ship hits the asteroid, particles emit from the point of contact, so in this case sparks? Is there a way to check point of contact? And if so, would it need to be in a callback, so when the bodies hit create an emitter? Thanks for any help!

Share this post


Link to post
Share on other sites

Create an emitter, when your bodies collide position it to that point and then emit some particles. If you look at the sci-fly example you'll see there is an emitter that follows the space ship around, so it'd be similar to that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.