SetSolid()
Jump to navigation
Jump to search
SetSolid()
defines the manner in which collisions between this entity and others are handled. SetSolidFlags()
can be used to tweak behaviour further.

SolidTypes
SOLID_NONE
- The entity does not generate its own collisions. Depending on the MoveType, its origin may still collide with brushes but will
Touch()
unreliably.Tip:Use
SetMoveType(MOVETYPE_NOCLIP)
to completely disable all movement collision. SOLID_BSP
- The entity has a brush model defined by the map. Collides with
SOLID_BBOX
andSOLID_VPHYSICS
objects, but not otherSOLID_BSP
s. SOLID_BBOX
- The entity collides with an axis-aligned bounding box. Collides with everything. Required for hitbox tests.
Tip:Use
UTIL_SetSize()
to define the extents of the box. But remember to stop calling it if the entity changes to another SolidType, or you will get a crash that disappears when a debugger is attached! SOLID_OBB
SOLID_OBB_YAW
- The entity collides with an object-aligned bounding box.
OBB_YAW
restricts orientation to Z-axis.Bug:"Not implemented yet".
[todo tested in ?]Confirm:Functions like
SOLID_NONE
right now. SOLID_CUSTOM
TestCollision()
is called every frame to handle collisions.Todo: Relationship withFSOLID_CUSTOMRAYTEST
andFSOLID_CUSTOMBOXTEST
?SOLID_VPHYSICS
- Use VPhysics for collisions. Collides with everything. Call
VPhysicsInitNormal()
orVPhysicsInitShadow()
if you use this!