SetSolidFlags(): Difference between revisions
Jump to navigation
Jump to search
Tip:An entity with
TomEdwards (talk | contribs) (Created page with ''''<code>SetSolidFlags()</code>''' defines various flags that affect the precise nature of an entity's solidity. It is used in conjunction with <code>SetSolid()</code>. …') |
FlaminSarge (talk | contribs) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
'''<code>SetSolidFlags()</code>''' | '''<code>SetSolidFlags()</code>''' implements various [[flag]]s that affect the precise nature of an entity's solidity. It is used in conjunction with <code>[[SetSolid()]]</code>. | ||
{{tip|An entity with <code>SetSolidFlags(FSOLID_NOT_SOLID <nowiki>|</nowiki> FSOLID_TRIGGER)</code> generates <code>[[Touch()]]</code> calls without colliding with other objects. This is the behaviour of [[trigger]]s.}} | {{tip|An entity with <code>SetSolidFlags(FSOLID_NOT_SOLID <nowiki>|</nowiki> FSOLID_TRIGGER)</code> generates <code>[[Touch()]]</code> calls without colliding with other objects. This is the behaviour of [[trigger]]s.}} | ||
== Other functions == | |||
; <code>void AddSolidFlags()</code> | |||
; <code>void RemoveSolidFlags()</code> | |||
: Adds or removes flags without affecting those already active. | |||
; <code>[[bool]] IsSolidFlagSet()</code> | |||
: Tests whether a particular flag is set. | |||
; <code>[[int]] GetSolidFlags()</code> | |||
: Get the complete SolidFlags [[bitstring]]. | |||
== Flags == | == Flags == | ||
| Line 10: | Line 20: | ||
: Ignore solid type + always call into the entity for swept box tests. {{todo}} | : Ignore solid type + always call into the entity for swept box tests. {{todo}} | ||
; <code>FSOLID_NOT_SOLID</code> | ; <code>FSOLID_NOT_SOLID</code> | ||
: | : Entity becomes non-solid (without losing its underlying SolidType). prop_dynamic entities set to SOLID_NONE are upgraded to SOLID_OBB and FSOLID_NOT_SOLID when Spawned so that the bounding box will properly rotate. | ||
; <code>FSOLID_TRIGGER</code> | ; <code>FSOLID_TRIGGER</code> | ||
: <code>[[Touch()]]</code> is triggered even if collisions are disabled. | : <code>[[Touch()]]</code> is triggered even if collisions are disabled. | ||
| Line 29: | Line 39: | ||
* <code>[[CCollisionProperty]]</code> | * <code>[[CCollisionProperty]]</code> | ||
* <code>[[SetSolid()]]</code> | |||
* [[VPhysics]] | * [[VPhysics]] | ||
* [[Bounding box]] | * [[Bounding box]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
Latest revision as of 10:06, 6 January 2023
SetSolidFlags() implements various flags that affect the precise nature of an entity's solidity. It is used in conjunction with SetSolid().
SetSolidFlags(FSOLID_NOT_SOLID | FSOLID_TRIGGER) generates Touch() calls without colliding with other objects. This is the behaviour of triggers.Other functions
void AddSolidFlags()void RemoveSolidFlags()- Adds or removes flags without affecting those already active.
bool IsSolidFlagSet()- Tests whether a particular flag is set.
int GetSolidFlags()- Get the complete SolidFlags bitstring.
Flags
FSOLID_CUSTOMRAYTEST- Ignore solid type + always call into the entity for ray tests. [Todo]
FSOLID_CUSTOMBOXTEST- Ignore solid type + always call into the entity for swept box tests. [Todo]
FSOLID_NOT_SOLID- Entity becomes non-solid (without losing its underlying SolidType). prop_dynamic entities set to SOLID_NONE are upgraded to SOLID_OBB and FSOLID_NOT_SOLID when Spawned so that the bounding box will properly rotate.
FSOLID_TRIGGERTouch()is triggered even if collisions are disabled.FSOLID_NOT_STANDABLE- Players can't stand on this. Todo: What happens when they try to?
FSOLID_VOLUME_CONTENTS- Contains a volumetric substance like water.
FSOLID_FORCE_WORLD_ALIGNED- Forces the collision rep to be world-aligned even if it's
SOLID_BSPorSOLID_VPHYSICS. [Todo] FSOLID_USE_TRIGGER_BOUNDS- Uses a special trigger bounds separate from the normal OBB. [Todo]
FSOLID_ROOT_PARENT_ALIGNED- Collisions are defined in the root parent's local coordinate space.
FSOLID_TRIGGER_TOUCH_DEBRIS- This
FSOLID_TRIGGERentity will alsoTouch()debris objects.