Explanation of CM_BoxTrace requested

Locked
speaker
Posts: 167
Joined: Sun Jan 13, 2008 8:34 pm

Explanation of CM_BoxTrace requested

Post by speaker »

Never mind, I figured it out.


Hi,

Could someone please explain the use of arguments in the function CM_BoxTrace? I marked below the arguments in question. What are the possible values and what is their purpose?

void
CM_BoxTrace
(
trace_t *results,
const vec3_t start,
const vec3_t end, <- how could I know in advance where the trace stops? Or is this a limit?
vec3_t mins,
vec3_t maxs,
clipHandle_t model, <- model of what?
const vec3_t origin,
int brushmask, <- inclusion/exclusion? if yes, what?
int capsule <- ???
)

I tried to figure it out by following function calls and argument usage but the whole thing seemed to me hopelessly convoluted. All I need is a simple line trace (like the railgun code does) and identification of the endpoint (type of entity hit).

Thanks!
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Re: Explanation of CM_BoxTrace requested

Post by Ganemi »

What are you trying to do with this? I tried to get the pill collision code to work but I don't understand it. :(

Maybe I should start with a sphere...
Locked