Lower corners of bbox vs. angles
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
Lower corners of bbox vs. angles
The 4 lower corners of the player bounding box are:
As the players yaw changes, it faces different angles with respect to these points.
Is there a way using vectoangles, aim or v_forward to determine which of these points
the player is closest to facing with respect to its angles_y ?
- Code: Select all
self.absmin
self.absmax - '0 0 56'
self.absmax - '0 32 56'
self.absmin - '0 -32 0'
As the players yaw changes, it faces different angles with respect to these points.
Is there a way using vectoangles, aim or v_forward to determine which of these points
the player is closest to facing with respect to its angles_y ?
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
Re: Lower corners of bbox vs. angles
local vector result;
makevectors(self.v_angle);
for (i = 0; i < 3; i++)
{
if (v_forward[i] < 0)
result[i] = other.absmax[i];
else
result[i] = other.absmin[i];
}
return result;
fix as required.
makevectors(self.v_angle);
for (i = 0; i < 3; i++)
{
if (v_forward[i] < 0)
result[i] = other.absmax[i];
else
result[i] = other.absmin[i];
}
return result;
fix as required.
- 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