Hello unreal engineers,
I was wondering how to make that type of bomb. So for those who don’t know, basicly, you spawn a bomb in the position of the character, and after 1 or 2 seconds it explodes in 4 directions. Top, Right, Bottom, Left. If it’s a wooden box, it destroys the box. If it’s a player, it kills the player. I was wondering how to make that.
I have 2 solutions but, both seem to be veeery hard to make.
Make 4 UBoxComponents and place them in 4 directions around the bomb. Override the Overlap function and do checks there whether it’s a player, box or something else. But I’m not sure it will work properly, because the functions won’t be called simultaneously (not sure if spelled right :D). In bomberman they kill and destroy everything simultaneously.
Perform ray traces in each direction and do checks. But I think I’ll have to make thousands of checks and actually perform more than 4 traces. Because if it hits something. It needs to continue even further. to check if there is a second player. Plus, I’m not sure how to limit the length of the trace.
So guys, any help is appreciated. Tell me which solution would be better. And if you know a third one, please share it