DestroyOnImpactComponent - acrimi/Raven GitHub Wiki
DestroyOnImpactComponent
is a simple marker component that defines a destruction behavior when an entity encounters an impact. As long as the entity is moving in at least one axis, an impact can be any of:
- Any contact via a CollisionComponent
- A hit recorded via a HitBoxComponent
- Contact with the ground (position
0
) via a ZComponent
When an impact is detected, the entity will be destroyed by setting its HealthComponent's hp
to 0
. If the entity has no HealthComponent, its DeathComponent will be activated. If the entity has no DeathComponent it will be destroyed immediately.
Configuration
This component doesn't accept any configuration parameters
Properties
This component has no exposed properties