Page 1 of 1
Point contents
Posted: Sun Oct 16, 2011 3:12 pm
by UglyFoot
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?
Re: Point contents
Posted: Sun Oct 16, 2011 8:59 pm
by ^misantropia^
You should post your code. If trap_PointContents() fails, maybe look at trap_EntitiesInBox().
Re: Point contents
Posted: Mon Oct 17, 2011 10:37 pm
by UglyFoot
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.
Re: Point contents
Posted: Tue Oct 18, 2011 10:29 pm
by UglyFoot
It works, even better than I've thought. It's weird that trap_PointContents doesn't work.
Re: Point contents
Posted: Wed Oct 19, 2011 6:17 am
by ^misantropia^
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.).