View Single Post
Re: Please help to make TraceHull function which can takes mins & maxs
Old
  (#2)
SamPlay
Member
 
Status: Offline
Posts: 46
Join Date: Jan 2006
Default Re: Please help to make TraceHull function which can takes mins & maxs - 02-09-2009

Hi,
I am not sure about what you are looking for, but I assume you want to code a function that provide a trace like the original SDK TraceHull function but for any axis aligned hull defined by the mins and maxs arguments.
Well, first of all you must be aware that SDK TraceHull uses a dedicated bsp tree associated with the hull number. As far as I remember, there are 3 such bsptrees, with one for a standing player and one for a crouching ( ducking ) one. these 3 bsptrees are pre-computed and stored in the .bsp file ( see ZHLT ie Zoner's Half Life Tool to see how). To put it simply, they are computed from the walls by thickening them to take into account the width of the hull; the same for the floor and the ceiling. The computation are quite involved and incompatible with a real-time use as you seem to want it.
Secondly, there exist an approximate computation ( used in quake code I think) which can be used in real-time, but I would think it is not good enough, and would not anyway give results equivalent to the former process.
Hope this helps!
samplay
  
Reply With Quote