Point contents

Locked
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Point contents

Post 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?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Point contents

Post by ^misantropia^ »

You should post your code. If trap_PointContents() fails, maybe look at trap_EntitiesInBox().
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Point contents

Post 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.
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Point contents

Post by UglyFoot »

It works, even better than I've thought. It's weird that trap_PointContents doesn't work.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Point contents

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