I'm trying to find the height of the ground at a specific position using TR_TraceRay/TR_TraceHull
The trace works fine when hitting non "terrain" ground (such as the bridge on badlands mid), but it doesn't hit uneven terrain (such as the ground besides the bridge), instead it hits a flat place below the ground (which I assume is the bottom of that terrain mesh)
Hitting the bridge:
(Not) hitting the terrain:
My trace code is the following:
PHP Code:
new Handle:trace = TR_TraceHullEx(pos, end, Float:{-16.0, -16.0, -16.0}, Float:{16.0, 16.0, 16.0}, MASK_ALL);
I've tried both TR_TraceHull and TR_TraceRay and various MASK flags but they all have the same problem