Skip to main content

PfxLayer

Layers for raycast collisions. For usage, see Physics.Raycast.

To create a collide layer with multiple layers, use the bitwise OR operator (|). For example, to create a collide layer that collides with terrain and static objects, you can use:

-- Only collide with terrain and static objects
local collideLayer = PfxLayer.Terrain | PfxLayer.Static
LayerDescription
PfxLayer.FullCollisionCollides with everything. Ideally nothing should be in this layer.
PfxLayer.NoCollisionCollides with nothing except fullcollision.
PfxLayer.StaticStandard static objects
PfxLayer.TerrainTerrain / heightfield
PfxLayer.DynamicStandard dynamic objects
PfxLayer.DestructionHavok destruction
PfxLayer.CharacterCollisionDefault character capsule rigidbody layer
PfxLayer.CharacterGhostModeCharacter capsule rigidbody layer while in ghostmode
PfxLayer.CharacterRagdollAll ragdoll rigid bodies that aren't keyframed
PfxLayer.CharacterRagdollKeyframedAll ragdoll rigid bodies that are keyframed
PfxLayer.CharacterAttachedDynamicRbUsed for rigid objects characters are attached to
PfxLayer.CharacterRagdollProxiesThe ragdoll proxy phantoms used for aiming/shooting
PfxLayer.ParticlePhysical particles
PfxLayer.ExplosivePhysical explosives, like grenades
PfxLayer.ProjectilePhysical projectiles, like missiles
PfxLayer.WeaponsPhysical dynamic weapons laying about in the world
PfxLayer.VehicleCollisionWheelVehicle wheels collision
PfxLayer.VehicleCollisionDynamicOnlyVehicle collision with other dynamic bodies
PfxLayer.VehicleCollisionVehicle collision with other bodies
PfxLayer.VehicleRaycastVehicle ray cast shape
PfxLayer.RaycastDefaultRegular raycasts
PfxLayer.RaycastEverythingPhysicalHits everything physical
PfxLayer.RaycastWheelsHits everything physical for wheels
PfxLayer.ShapeQueryDefaultDefault filter layer for volume checks
PfxLayer.ShapeQueryTriggerFilter layer for volume triggers
PfxLayer.ShapeQueryExplosionFilter layer for explosion volumes
PfxLayer.ShapeQueryVehiclesFilter layer for vehicle volumes
PfxLayer.StaticAndDestructionColliding with static physics, terrain and destruction
PfxLayer.AllDynamicObjectsCollide with all dynamic objects
PfxLayer.ListenerEffectsLow quality vehicles, terrain and rigid objects
PfxLayer.ShapeQueryClimbingFor hitting things player can climb on
PfxLayer.UnusedLayer31Reserved for future use
PfxLayer.CountSystem layer count
PfxLayer.MaxCountMaximum number of layers (32)