Collision groups: Difference between revisions
No edit summary |
(Portal 2 and Gmod collision groups, I didn't test Gmod yet) |
||
Line 297: | Line 297: | ||
| Set by arrows and the Short Circuit's secondary attack ([[tf_projectile_mechanicalarmorb]]). Same as <code>TFCOLLISION_GROUP_ROCKETS</code> but doesn't collide with other rockets. | | Set by arrows and the Short Circuit's secondary attack ([[tf_projectile_mechanicalarmorb]]). Same as <code>TFCOLLISION_GROUP_ROCKETS</code> but doesn't collide with other rockets. | ||
|} | |} | ||
== | |||
Extended collision groups in {{Gmod|2}}: | |||
{| class="standard-table" | |||
|- style="z-index:1; position:sticky; top:0" | |||
! width="100px" | Name | |||
! width="50px" | Value | |||
! width="75px" | Solid to players | |||
! width="75px" | Solid to hitscan | |||
! width="75px" | Solid to projectiles | |||
! width="75px" | Solid to physics | |||
! width="75px" | Solid to world | |||
! Description | |||
|- id="world" | |||
| <center>COLLISION_GROUP_WORLD</center> | |||
| <center>20</center> | |||
| {{N/A|{{todo}} Unknown}} | |||
| {{N/A|{{todo}} Unknown}} | |||
| {{N/A|{{todo}} Unknown}} | |||
| {{N/A|{{todo}} Unknown}} | |||
| {{N/A|{{todo}} Unknown}} | |||
| Doesn't collide with players/props | |||
|} | |||
Extended collision groups in {{P2|2}}: | |||
{| class="standard-table" | |||
|- style="z-index:1; position:sticky; top:0" | |||
! width="100px" | Name | |||
! width="50px" | Value | |||
! width="75px" | Solid to players | |||
! width="75px" | Solid to hitscan | |||
! width="75px" | Solid to projectiles | |||
! width="75px" | Solid to physics | |||
! width="75px" | Solid to world | |||
! Description | |||
|- id="pzclip" | |||
| <center>COLLISION_GROUP_PZ_CLIP</center> | |||
| <center>20</center> | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| | |||
|- id="camerasolid" | |||
| <center>COLLISION_GROUP_CAMERA_SOLID</center> | |||
| <center>21</center> | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| Solid only to the camera's test trace. | |||
|- id="placementsolid" | |||
| <center>COLLISION_GROUP_PLACEMENT_SOLID</center> | |||
| <center>22</center> | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| Solid only to the placement tool's test trace. | |||
|- id="playerheld" | |||
| <center>COLLISION_GROUP_PLAYER_HELD</center> | |||
| <center>23</center> | |||
| {{No}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| Held objects that shouldn't collide with players. | |||
|- id="weightedcube" | |||
| <center>COLLISION_GROUP_WEIGHTED_CUBE</center> | |||
| <center>24</center> | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| Cubes need a collision group that acts roughly like COLLISION_GROUP_NONE but doesn't collide with debris or interactive. | |||
|- id="debrisblockprojectile" | |||
| <center>COLLISION_GROUP_DEBRIS_BLOCK_PROJECTILE</center> | |||
| <center>25</center> | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| Supposedly only collides with bullets, but does not. | |||
|} |
Latest revision as of 22:36, 24 August 2025
Collision groups define what types of collision can collide with each other. For example, an entity using COLLISION_GROUP_DEBRIS
will only collide with the world and not any dynamic entities.
When the game tests a pair collision groups, the lower collision group is always first in the checks. All collision groups can touch triggers.
List
These are defined in public/const.h
:
Name | Value | Solid to players | Solid to bullets | Solid to projectiles | Solid to physics | Solid to world | Description |
---|---|---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Default collision group | ||
No | No | No | No | Yes | Typically used for small objects that shouldn't interfere with gameplay. Will not touch triggers unless the trigger has the Debris spawnflag enabled. Collides with COLLISION_GROUP_PUSHAWAY .
| ||
No | No | No | No | Yes | Despite the name, this is the same as COLLISION_GROUP_DEBRIS , but does not collide with COLLISION_GROUP_PUSHAWAY .
| ||
No![]() |
No | No | No | Yes | Same as above, but doesn't collide with other COLLISION_GROUP_INTERACTIVE_DEBRIS . VPhysics props that are asleep will be converted to COLLISION_GROUP_DEBRIS
| ||
Yes | Yes | Yes | Yes | Yes | Does not collide with debris. Gibs from models not flagged as debris are set to this group. func_door and func_door_rotating use this if set to ignore debris. | ||
Yes | Yes | Yes![]() |
Yes | Yes | Used by players, but NOT for movement collision. Does not collide with COLLISION_GROUP_PASSABLE_DOOR .
Except in In | ||
Yes | Yes | Yes | Yes | Yes | Used by func_breakable_surf. Does not collide with other COLLISION_GROUP_BREAKABLE_GLASS . NPCs ignore these for weapon LOS checks.
| ||
Yes | Yes | Yes | Yes | Yes | Used by driveable vehicles. Always collides against COLLISION_GROUP_VEHICLE_CLIP
| ||
Yes![]() |
Yes | Yes![]() |
Yes | Yes | Used by player movement collision tests.
In | ||
Yes | Yes | Yes | Yes | Yes | Used by NPCs. Always collides with COLLISION_GROUP_DOOR_BLOCKER
| ||
No | No | No | No | No | Set on players/NPCs which enter a vehicle. | ||
No | Yes | Yes![]() |
Yes | Yes | Used by weapons, including when dropped. | ||
No | No | No | No | No | Used by func_vehicleclip. Ony collides with COLLISION_GROUP_VEHICLE .
| ||
Yes![]() |
Yes | No![]() |
Yes | Yes | Set on projectiles. Does not collide with other projectiles.
In | ||
No | No | No![]() |
No | No | Used by prop_door_rotating (creates a entity_blocker entity). Only supposed to collide with COLLISION_GROUP_NPC .
In Todo: Investigate the projectile behavior more
| ||
No | Yes | Yes | Yes | Yes | Used by func_door and func_door_rotating when the non-solid spawnflag is set. | ||
No | Yes | No | Yes | Yes | Set on entities dissolved with env_entity_dissolver. Only collides with COLLISION_GROUP_NONE .
| ||
No![]() |
Yes | Yes | Yes | Yes | Set by func_physbox_multiplayer. Also set by prop_physics_multiplayer on spawn and when awakened, if sv_turbophysics is enabled. Collides with COLLISION_GROUP_DEBRIS . Used to push away props from the player in ![]() ![]() | ||
Yes![]() |
Yes | Yes | Yes | Yes | Set on NPCs when they are potentially stuck in a player. Behaves identically to COLLISION_GROUP_NPC if not testing against COLLISION_GROUP_PLAYER .
| ||
Yes | Yes | Yes | Yes | Yes | Set on NPCs playing out a scripted_sequence, if NPC collisions are set to be disabled.
In |
Extended collision groups in Team Fortress 2 only:
Name | Value | Solid to players | Solid to hitscan | Solid to projectiles | Solid to physics | Solid to world | Description |
---|---|---|---|---|---|---|---|
No | Yes | N/A Depends |
Yes | Yes | Set by grenade projectiles. Does not collide with other TFCOLLISIONGROUP_GRENADES and rockets.
| ||
N/A Depends |
Yes | Yes | Yes | Yes | Set by Engineer buildings except teleporters. Uses team-specific contents on players. | ||
Yes | Yes | Yes | Yes | Yes | Set on teleporters. | ||
No | Yes | Yes | Yes | Yes | Set by placed sappers and the medigun shield (entity_medigun_shield). | ||
No | Yes | No | Yes | Yes | Set by rocket projectiles. Collides with COLLISION_GROUP_PLAYER but not player movement. Does not collide with weapons or any projectiles except rockets. Collides with medigun shields.
| ||
Yes | No | No | No | No | Used by func_respawnroom and func_respawnroomvisualizer. | ||
No | Yes | Yes | Yes | Yes | Set by team-assigned tf_pumpkin_bombs. | ||
No | Yes | No | Yes | Yes | Set by arrows and the Short Circuit's secondary attack (tf_projectile_mechanicalarmorb). Same as TFCOLLISION_GROUP_ROCKETS but doesn't collide with other rockets.
|
Extended collision groups in Garry's Mod:
Name | Value | Solid to players | Solid to hitscan | Solid to projectiles | Solid to physics | Solid to world | Description |
---|---|---|---|---|---|---|---|
[Todo] Unknown | [Todo] Unknown | [Todo] Unknown | [Todo] Unknown | [Todo] Unknown | Doesn't collide with players/props |
Extended collision groups in Portal 2:
Name | Value | Solid to players | Solid to hitscan | Solid to projectiles | Solid to physics | Solid to world | Description |
---|---|---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | |||
No | No | No | No | No | Solid only to the camera's test trace. | ||
No | No | No | No | No | Solid only to the placement tool's test trace. | ||
No | Yes | Yes | Yes | Yes | Held objects that shouldn't collide with players. | ||
Yes | Yes | Yes | Yes | Yes | Cubes need a collision group that acts roughly like COLLISION_GROUP_NONE but doesn't collide with debris or interactive. | ||
No | No | No | No | No | Supposedly only collides with bullets, but does not. |