Raised This Month: $51 Target: $400
 12% 

TR_TraceRay not hitting uneven terrain


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
icewind
New Member
Join Date: Aug 2015
Old 06-18-2017 , 13:30   TR_TraceRay not hitting uneven terrain
Reply With Quote #1

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(posendFloat:{-16.0, -16.0, -16.0}, Float:{16.016.016.0}, MASK_ALL); 
I've tried both TR_TraceHull and TR_TraceRay and various MASK flags but they all have the same problem

Last edited by icewind; 06-18-2017 at 13:31.
icewind is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 06-18-2017 , 18:14   Re: TR_TraceRay not hitting uneven terrain
Reply With Quote #2

When creating displacements its possible to enable / disable physics/hull/ray collisions individually. Maybe this was done on that map for some reason (optimization?)
Kinsi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode