SightComponent - acrimi/Raven GitHub Wiki
SightComponent
represents an entity's ability to see other entities. All entities that fall within its range of sight will be tracked in the component for reference by other systems. The entity's sight is limited to a box projected forward according to the entity's orientation with a relative width to match that of the entity.
Configuration
When used inside the components
block, the initial state of the component can be configured with the following parameters:
Key | Type | Description |
---|---|---|
range | float | The distance, in gl units, the entity can see in front of itself. Defaults to 0 . |
perception | string[] | An array of special invisibility types that the entity can see. If another entity has an InvisibilityComponent with a defined type, and that type is listed in the perception array, that entity will still be considered visible to this entity. |
Examples:
"SightComponent": {
"range": 160
}
"SightComponent": {
"range": 160,
"perception": [
"ghost",
"camouflage"
]
}
Properties
This component has no exposed properties