You can trace, then loop through all terrain vertices and get closest one to the hit position, or you can use 'ent_getvertex' with 'hit.vertex', but it won't be accurate. Anyway if you want to access 'hit' parameters you need to use SCAN_TEXTURE, it won't work other ways. You don't need to use USE_POLYGON and POLYGON flag for terrain, it's not a model and it will work correctly without them! Terrain already has POLYGONAL hull, it doesn't have BBOX or elliposid hull.

I'll post working example tomorrow, I can't do that right now via my cellphone.

Problem with 'hit.vertex' returning zero in your example only related to SCAN_TEXTURE, you can't access 'hit' parameters without using it!

Best regards


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung