2018-09-19 Explosions aesthetics
Yesterday I got some time to finish the last level, but instead of that, I choose to make a more precise way to handle explosions, so if a bomb explodes due to a hard impact on a wall (there are cannons that can shoot bombs), the explosion generates on the correct collision point, and direction rotation
This one took time, not because it were difficult, but because I didn't know Unity enough to find that there is a function that given an start vector, and an end vector, it will give an angle (the function is Quaternion.FromToRotation())... I was reading how inverse trigonometric functions, so I can get an angle using arctan.... I guess the knowledge stays in exchange of the time spent in knowing this :shrug2:
However, the sprite still doesn't look right when it happens over little colllders like... me, the player!
In theory the player has a collider, the bomb exploded over a collider, therefore that's its explosion origin, however it just doesn't look right... I'll leave it that way for now, anyway... why? because with this way of placing and rotating explosions I can refactor the explosion in the future to make it work not as a single sprite but as a particle system, making debris and fire more realistic ... tho I would need to see how to make not to loose too much the pixel art essence.
What I would do in the meantime is to improve the explosions I have, right now I have 2 animation sprites for explosions: one for explosion on floor (now it applies for walls, this is the one on the screenshots), and explosion in the air... I would take the explosion in the air for small colliders, and use the other for the rest.
Leave a comment
Log in with itch.io to leave a comment.