Quake3World.com Forums
     Programming Discussion
        Explanation of CM_BoxTrace requested

Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC

Print view Previous topic | Next topic 
Topic Starter Topic: Explanation of CM_BoxTrace requested

Joined: 13 Jan 2008
Posts: 167
PostPosted: 11-19-2020 04:43 AM           Profile Send private message  E-mail  Edit post Reply with quote

Never mind, I figured it out.


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?

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).



The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 516
PostPosted: 01-05-2022 10:56 PM           Profile Send private message  E-mail  Edit post Reply with quote

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...

Quake3World.com | Forum Index | Programming Discussion

Post new topic Reply to topic

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group