Talk:$bbox

From Valve Developer Community
Jump to navigation Jump to search

bbox = hull ?

I'm confused. I'd got the idea from CollisionProperty that the "Surrounding Bounds" (== "Bounding Box" == $bbox right?) enclosed all the collision geometry, including the collision hull (as in NPC Hull and Player Hull), hitboxes, etc and is used for a preliminary collision-test filter before testing against specific bits of the model? --Beeswax 16:31, 28 Apr 2008 (PDT)

A bounding box is a general term for the cubic dimensions of the entity extents. It can be used for multiple purposes, including collision and early-out trace testing. There's no contradiction. This command is used infrequently anyway. --JeffLane 18:14, 28 Apr 2008 (PDT)
So the bounding box's geometry is often the same as the collision hull's geometry, but not always? I was interpreting the bbox and hull as different properties of a model, which would help understanding when and why they might have different dimensions ... presumably a model's bbox is calculated by StudioMDL, so $bbox is only used as an override by people who know what effect it has in game ? --Beeswax 19:53, 28 Apr 2008 (PDT)
I think they're one and the same, actually. --TomEdwards 01:37, 29 Apr 2008 (PDT)
This is the line in CollisionProperty#Surrounding bounds that makes me think bbox and hull are different things:
  • By default the surrounding bounds are computed as a box that surrounds the collision hull. If the collision hull is smaller than the hitboxes, the surrounding bounds must be enlarged to guarantee a proper hitbox test. It can be customized by calling: ...
Does that mean the collision hull must be enlarged to surround the hitboxes ? ie hitboxes outside the collision hull cannot be hit by bullets ? --Beeswax 08:38, 29 Apr 2008 (PDT)
I believe using $bbox in the to QC is used for early-out ray tracing tests (such as for hit traces). The AI hulls are defined in code and specified per NPC (also in code). I can check on that to make sure, but I believe that is the case. --JeffLane 18:12, 29 Apr 2008 (PDT)
There appears to be an undocumented $cbox QC command (see Category_talk:QC_Commands#Checklist) - my guess would have been that this allows configuration of the Collision Box (Hull) as distinct from from the $bbox and $hbox ... ? --Beeswax 09:12, 29 Apr 2008 (PDT)
BTW you wouldn't happen to know why NPC Hulls define 2 nested boxes per Hull? (see Talk:NPC_Hull) I assume the larger one is the collision hull, but the other ? --Beeswax 19:53, 28 Apr 2008 (PDT)