Okay yeah, title’s not very effective, so I’ll explain in greater detail.
Basically player shoots a target, but rather than use direct collision detection, I want to apply a basic % chance to hit, reduced by terrain in the way, and then reduced by armor or dodge skills on the enemy. The math itself is obviously not very complex, but I’m wondering the best way to go about detecting the cover.
If I’m not mistaken, simply using a collider on the object would terminate the ray, would I then need to do a second (or third, fourth) from the opposite side of the terrain object to the target?
As an alternative, what about a series of rays fired down reporting what was hit? I assume the former method would likely be more efficient, but I’m not sure how to go about it and not have what would be a single line, turn into a lightning bolt or zig-zag.