Terrain destruction by melee
So we could attack walls and objects with melee weapons. Should only work when the tile doesn’t have any units standing on it (unconscious units are ignored).
So, any idea how should this work exactly?
There can be only one unit on a tile (easy)... but there can be several objects to destroy (on a screenshot, should I destroy the wall or the stairs behind the wall?)
Also the objects don't occupy the whole tile... if I aim for the center of the tile, I can destroy for example a stone fence or wooden stairs... but I cannot destroy a wall (since it's not in the center of the tile).
Should I check all 6144 voxels (16*16*24) for a presence of an object?
And what if I am elevated... should I check neighboring tile(s) as well?
Or should I trace an invisible bullet and see what it hits? If so, which voxel to take as starting point (e.g. unit's eyes) and as end point (e.g. center of the target tile's floor)?
And what if I am a 2x2 unit (tank or a reaper)... which tile am I even targeting? Or am I targeting both tiles in front of me?