Day of the particle

Collisions of asteroids worked great, but they didn’t feel like large colliding rocks. There was a lack of debris and dust. Luckily, this is easy to fix. Godot comes with comprehensive particle effects and I used just them to spawn clouds of dust when stones hit something.

Emitter itself was easy enough to make, but it turns out it’s not so easy to detect point of impact. Data is there in the physics engine all right, but when simply asked it just dumps way too much information. It took some fiddling and filtering to get data of collision that actually should put up clouds of dust.

At the moment it looks okay, but still needs tuning. Current algorithm tends to overdoo collisions between some objects – they raise way more dust, than I believe. I’m putting into account mass of the object and it’s velocity to compute  impact energy, but at times I get some weird result.

There certainly should be more variation on impacts. Perhaps risen cloud of dust should be affected by velocity of impact? This should be easily doable.

Time to debug and tweak.

Leave a Reply