Well, I built a solution, but it's not very beautiful, and hopefully there's a better way to do this. Anyhow:
First, some definitions:
a = angle of the unit
u = x of the unit
v = y of the unit
k = x of the destructable
g = y of the destructable
r is the solution aka the distance from the destructable to the line extended perpendicularly from the unit
if a is equal to a multiple of 180, then:
r = Abs(k - u)
if a is equal to 90 plus a multiple of 180, then:
r = Abs(g - v)
if the value of a satisfies neither of those two conditions, a much uglier formula can be used. It will be split up for convenience; I used about 8 inches of paper writing it out fully in small writing otherwise.
t will be a variable defined for the sake of convenience and efficiency. It represents the solved x location of where the line from the destructable intersects the perpendicular line from the unit, and is defined as:
t = ((g - k*tan(a)) - (v - u*tan(a-90)))/(tan(a-90) - tan(a))
r = SquareRoot((k - t)^2 + (k*tan(a) - tan(a)*t)^2)
Granted, there's some compression that could be done (ie storing tan(a) and tan(a-90) to variables). As such, if you were to define h as tan(a) and j as tan(a-90), you would get:
t = ((g - k*h) - (v - u*j))/(j - h)
r = SquareRoot((k - t)^2 + (k*h - h*t)^2)
Which you could further simplify, thus winding up with the result of:
t = (g - k*h - v + u*j)/(j - h)
r = SquareRoot((k - t)^2 + (h*(k-t))^2)
Thus, your final result is:
if a is a multiple of 180 then:
r = Abs(k - u)
elseif a is 90 plus a multiple of 180 then:
r = Abs(g - v)
else
h = tan(a)
j = tan(a - 90)
t = (g - k*h - v + u*j)/(j - h)
r = SquareRoot((k - t)^2 + (h*(k-t))^2)
Note however that a region won't angle with a unit, thus you'll have to use a neato way to only pick destructables behind a unit when enumerating them in an area around the unit. Good luck and ask if you're not sure how to do that!