checkbottom ()
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
checkbottom ()
Is this a pretty good def for this function:
?
I noticed in some other modders code :
I just never realized checkbottom can be used to detect a ledge. Though Im not an engine coder yet, It seems to scan the entire min_z of the model
and I guess looks for contact with either world or a BSP, and will be true if the entire face is in contact? If this is the case, could that code be hacked to return similar functions for the sides and top of the model?
- Code: Select all
float (entity e) checkbottom = #40; // e.absmin_z is fully touching world
?
I noticed in some other modders code :
- Code: Select all
// if the corpse is on a ledge, or in mid-air, gib it to prevent hang-ups
if (!checkbottom(self) || (other.absmin_z + 4 < self.absmin_z))
I just never realized checkbottom can be used to detect a ledge. Though Im not an engine coder yet, It seems to scan the entire min_z of the model
and I guess looks for contact with either world or a BSP, and will be true if the entire face is in contact? If this is the case, could that code be hacked to return similar functions for the sides and top of the model?
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
Re: checkbottom ()
checkbottom does tracelines at certain points. quake's simple geometry generally means this is sufficiently reliable to avoid false positives.
it returns false if any one of those traces goes down too far.
don't expect it to be happy on slopes.
it returns false if any one of those traces goes down too far.
don't expect it to be happy on slopes.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest