I want my ranged weapon ai to understand when to prefer following a target or just getting in range for a shot.
My ai has two LoS behaviors, one with full height obstacles (i.e. Walls) and the other with low height obstacles (think: handrails and such), both block pathfinding but only the high one blocks sight.
I want them to notice a low obstacle on the way to their target and approach it as close as possible in an attempt to line up a shot.
It should work by having LOS 2 detect a collision in direct line to the target and moving as close as possible along that direct line.
So i need a way to get the collsion point of my "raycheck" with low obstacles. Any ideas perhaps?