ProximitySensor
io.github.srs.model.entity.dynamicentity.sensor.ProximitySensor
final case class ProximitySensor[Entity <: DynamicEntity, Env <: Environment](offset: Orientation, range: Range) extends Sensor[Entity, Env]
A proximity sensor that can sense the distance to other entities in the environment. It calculates the distance to the nearest entity within its range and returns a normalized value. The value is normalized to a range between 0.0 (closest) and 1.0 (farthest).
Type parameters
- Entity
-
the type of dynamic entity that the sensor can act upon.
- Env
-
the type of environment in which the sensor operates.
Value parameters
- offset
-
the offset orientation of the sensor relative to the entity's orientation.
- range
-
the range of the sensor, which defines how far it can sense.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article