Sensor

A sensor is a type of component that can be attached to any type of Object. They allow you to detect other Object in proximity. Useful for creating a different type of triggers or to take logical actions in the event specific object(s) is a nearby Volume; sensors can also be used for lighting and much more.

See Also

Static Variables


Name Description
object Reference to the Object where the active Sensor is attached to.
neighbor_count The current amount of valid neighbors around the parent Object.

Variables


Name Description
radius Active radius of the Sensor.
fps The update frequency (in Mhz) of the Sensor.
color Custom color to visually identify the Sensor inside the editor's 3d viewport.
sorting_method Specify the way the Volume list is sorted by assigning an existing SortingMethod.
name A unique name to identify the Sensor to its parent Object.
enabled Controls the activation state of the Sensor.
flags Bitmask of Sensor flags.
inclusion_mask Bit mask of InclusionMask values specifying what type Object should be detected by the active Sensor
filter Optional string that is required to be found in the Volume Object name to be added in the active Volume list.
global Determine wether or not the Sensor should filter through all Scene currently active.
sync_time Last time the Sensor was re-evaluated.

Functions


Name Description
GetVolume Return a specific Volume using its index as key.
GetVolumeAt Return a specific Volume using its index as key.

Volume


A structure that contains information about the nearby objects in proximity of the Sensor parent Object.

Static Variables


Name Description
object Reference to the Object associated to the active Volume.
scene Asset id of the Scene where the Object volume was instanciated from.
distance The current distance of the Volume with the active Sensor parent Object.
lod_index The active level of detail used by the Volume (if any).

SortingMethod


Available Object sorting method to use when drawing a RenderLayer and Sensor.

  • kRenderList: Render the Object list as it is.
  • kFrontToBack: Sort Object front to back using the distance between the object's pivot and the RenderLayer Camera.
  • kBackToFront: Sort Object back to front using the distance between the object's pivot and the RenderLayer Camera.
  • kVolume: Sort Object by volume (from biggest to lowest).
  • kPriority: Use the Object priority property to sort the render list.
  • kBlit: Re-use the render list of the previous RenderLayer (when applicable/if any).




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA