Quake3World.com Forums
     Programming Discussion
        Point contents


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




Print view Previous topic | Next topic 
Topic Starter Topic: Point contents

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 10-16-2011 07:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


When I try to know if a point is inside a trigger (and I'm sure it is) I get that trap_PointContents return is always zero. The point is the middle point of the trigger and I've calculted it from the absolute max and min, I've even checked it in Radiant and ingame (G_Printf) so the point is correct. Does somebody know why this happens?




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 10-16-2011 12:59 PM           Profile Send private message  E-mail  Edit post Reply with quote


You should post your code. If trap_PointContents() fails, maybe look at trap_EntitiesInBox().




Top
                 

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 10-17-2011 02:37 PM           Profile Send private message  E-mail  Edit post Reply with quote


I would post the code but most of it it's not related to this problem and it's basically calculating a point and calling the function. I'll try trap_EntitiesInBox(), thanks.




Top
                 

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 10-18-2011 02:29 PM           Profile Send private message  E-mail  Edit post Reply with quote


It works, even better than I've thought. It's weird that trap_PointContents doesn't work.




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 10-18-2011 10:17 PM           Profile Send private message  E-mail  Edit post Reply with quote


I'm not 100% sure (don't have the quake3 source on this machine) but I think trap_PointContents deliberately skips over anything non-solid (where solid means anything that can potentially slow the player down, like walls, water, etc.).




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.