Traces randomly terminate

I set up a system that designed to do a sort of advanced sound occlusion custom script.
Sound emitter traces in all directions, upon hitting an obstacle a second trace generated from the point of impact towards the player. If it hit player it adds 1 to the count of confirmed hits, which in turn used to modify the frequency and volume of the sound emitter. The idea is that if no rays reach player then sound is fully occluded, and closer the player is to the source of the sound and fewer obstacles is between him and the sound, the less occluded sound is.

The problem… Traces terminate in empty air for no apparent reason (Red traces are primary traces, green ones are secondary traces):

ON this image only 4 traces reach the player (bodyless pair of arms to the right)

My setup:

Trace Ray function:

This looks very complicated, why not just use an attenuation actor? ( sorry, this might be a silly question… )

Attenuation is ugly that way since it works on a line of sight basis, so hide behind a thin pillar and suddenly sound thinks you are in other room and becomes muffled. With my setup it is basically extends line of sight to an area around the sound. When it works - it provides relatively natural attenuation.

Meh, sorry, no idea…

You sure end position is calculated correctly?

my thoughts…

Well it is tracing from what appears to be correct positions, and the player is the focal point of all secondary traces, so I guess yeah?

I always find that whenever I think I’ve found a buh, the engine is basically doing exactly what I’m asking it to do.

So, somehow, you’re asking it to perform this behaviour, and not seeing it.

A good piece of advice is always to strip things to almost nothing, then build up again.

I’m not seeing anything in particular when I look at your code, but there is a mistake somewhere in there. Stripping it right down will help you find it.

Sorry not to be more helpful…