Forum

Bounding Box Too Big?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Bounding Box Too Big?

Postby Junrall » Sat Apr 10, 2010 8:31 pm

Hello again,

I've noticed that the bounding box on some items seems to be overly tall... for instance, the box of nails is:
Code: Select all
setsize (self, '0 0 0', '32 32 56');


Why would the model for a box of spikes be 56 units tall?
Shouldn't it be 32 units tall? After all, it is a square.
Would changing this cause any issues?
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA

Postby Lardarse » Sat Apr 10, 2010 11:33 pm

Changing it would mean that you could jump over it without picking it up. That's about the only difference...
Roaming status: Testing and documentation
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby Orion » Sat Apr 10, 2010 11:56 pm

And also, on entity to world collisions there are only 3 different clipping hulls:

Bullet size - '0 0 0'
Player size - '32 32 56' (mins: '-16 -16 -24', maxs: '16 16 32')
Shambler size - '64 64 88' (mins: '-32 -32 - 24', maxs: '32 32 64')

But on entity to entity collisions you can use the size you want. So if you reduce the height of the ammo boxes' bouding box, you can jump over them w/o picking them up, as Lardarse said.

The only maps that support different hull sizes for entity-world collisions are Q3BSP, and only DP and FTE can run these maps AFAIK.

For example, on a regular Quake engine you CAN make a crouch command that simply reduces your bbox's height to dodge enemy fire, but, even if you're crouched, you won't pass certain low-height passages.

One thing to note is that bboxes are in form of "cubes" that never rotate, otherwise you'd get stuck. As they're cube-shaped, a bullet will hit BETWEEN a player or monster's legs. :P
Most recent FPS games have one bounding box for each part of the body, AFAIK. So, unlike Quake, they DO rotate and vary their sizes if needed. I think.

That's why in Quake you can sometimes see part of a dead player or monster's body stuffed into a wall. :P
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Team Xlink » Sun Apr 11, 2010 12:26 am

You can also fix that problem with per-poly collision I think.
Team Xlink
 
Posts: 368
Joined: Thu Jun 25, 2009 4:45 am
Location: Michigan

Postby Junrall » Sun Apr 11, 2010 3:22 am

Orion wrote:But on entity to entity collisions you can use the size you want. So if you reduce the height of the ammo boxes' bouding box, you can jump over them w/o picking them up, as Lardarse said.

Cool! I'm experimenting with Gyro... some items stop short of solids when they float upwards in water. This will solve that problem.

One thing to note is that bboxes are in form of "cubes" that never rotate, otherwise you'd get stuck. As they're cube-shaped, a bullet will hit BETWEEN a player or monster's legs. :P
Most recent FPS games have one bounding box for each part of the body, AFAIK. So, unlike Quake, they DO rotate and vary their sizes if needed. I think.

That's why in Quake you can sometimes see part of a dead player or monster's body stuffed into a wall. :P


That explains why a corner of an ammo box will disappear when it is rotated.
I'm using DP... how hard would it be to re-size the bounding box as model turns and rotates? This wouldn't be perfect I suppose... but it would be better than having something land partially in a wall.
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA

Postby Junrall » Sun Apr 11, 2010 4:28 am

Orion wrote:And also, on entity to world collisions there are only 3 different clipping hulls:

Bullet size - '0 0 0'
Player size - '32 32 56' (mins: '-16 -16 -24', maxs: '16 16 32')
Shambler size - '64 64 88' (mins: '-32 -32 - 24', maxs: '32 32 64')

But on entity to entity collisions you can use the size you want. So if you reduce the height of the ammo boxes' bouding box, you can jump over them w/o picking them up, as Lardarse said.

The only maps that support different hull sizes for entity-world collisions are Q3BSP, and only DP and FTE can run these maps AFAIK.

For example, on a regular Quake engine you CAN make a crouch command that simply reduces your bbox's height to dodge enemy fire, but, even if you're crouched, you won't pass certain low-height passages.

One thing to note is that bboxes are in form of "cubes" that never rotate, otherwise you'd get stuck. As they're cube-shaped, a bullet will hit BETWEEN a player or monster's legs. :P
Most recent FPS games have one bounding box for each part of the body, AFAIK. So, unlike Quake, they DO rotate and vary their sizes if needed. I think.

That's why in Quake you can sometimes see part of a dead player or monster's body stuffed into a wall. :P


Dude, I totally misunderstood what you were trying to tell me... it took me a little bit of trial and error for it to sink in on it's own. :roll: Sorry 'bout that.
So, no, resizing the bounding boxes will not solve my problem of items stopping short of solids when they float upwards in water.
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest