Hello! We’re trying to send out a lot of rays and see where it collides in the world, and as of now, it works well for static geometry and actors. It was requested to generate a hit upon impacting a WaterBodyLake object as well, and we’re struggling to find a solution, even though we feel like we’re missing something simple.
The water has dynamic waves, and ideally this should impact the exact location of the hit, but as of now the line trace just passes through the water surface and hits the lake bed.
We’re unsure how to progress, and any help is greatly appriciated!
Currently in the code we have:
// ... other stuff
queryParam = FCollisionQueryParams::DefaultQueryParam; queryParam.bTraceComplex = true;
queryParam.bReturnFaceIndex = true;
bHit = GetWorld()->LineTraceSingleByChannel(hitResult, traceStart, traceEnd, ECollisionChannel::ECC_Visibility, queryParam, FCollisionResponseParams::DefaultResponseParam);