From Valve Developer Community
Revision as of 19:33, 22 May 2011 by TomEdwards
SetSolid() defines the manner in which this entity's collisions are handled.
SetSolidFlags() can be used to tweak behaviour further.
Note:Behaviour can change subtly depending on whether the object is colliding or being collided with.
- The entity does not generate its own collisions. Depending on the MoveType, its origin may still collide with brushes but will
SetMoveType(MOVETYPE_NOCLIP)to completely disable all movement collision.
- The entity has a brush model defined by the map. Does not collide with other
- The entity collides with an axis-aligned bounding box. Collides with everything. Required for hitbox tests.
UTIL_SetSize()to define the extents of the box.Bug: Stop calling SetSize if the entity changes to another SolidType, or you will get a crash that disappears when a debugger is attached!
- The entity collides with an object-aligned bounding box.
OBB_YAWrestricts orientation to the Z-axis.
UTIL_SetSize()can be used to define the box's extents.
TestCollision()is called every frame to handle collisions. To do: Relationship with
- Loads a collision mesh from the entity's model. This results in the same collision shape as VPhysics would have, without actually enabling VPhysics collisions or simulation.