Lemmings
Remappable Gestures For Unity
Loading...
Searching...
No Matches
Lemmings.LemmingRelationshipProxy Class Reference

A MonoBehaviour that represents the spatial location and rotation of a LemmingRelationship. It provides support for spatial interaction detection such as gaze and triggers, and exposes that data via structured fields and UnityEvents. More...

Inherits MonoBehaviour.

Data Structures

struct  LemmingProxyData
 Serializable data container for proxy state. Useful for diagnostics and UI representation. More...
class  ValidTagEntry
 Wrapper class to allow tag string dropdowns in the inspector. More...

Public Member Functions

LemmingProxyData GetProxyData ()
 Constructs and returns the latest proxy data snapshot.
virtual float ComputeRadius ()
 Computes a radius based on the average distance of relationship members from this proxy.
void ConfigureCollider (float radius, bool isTrigger)
 Sets this proxy's collider radius and whether it acts as a trigger.
bool Matches (GameObject other)
 Checks whether a GameObject matches a tag in the proxy's filter or the relationship ID.

Data Fields

LemmingRelationship relationship
string ID
 Unique identifier for this proxy. Auto-generated using the relationship ID.
string description
 Optional description for debugging or tagging purposes.
bool detectTriggers = false
bool detectGaze = false
float gazeRange = 10f
List< ValidTagEntryvalidTags = new List<ValidTagEntry> { new ValidTagEntry() }
TriggerEvent OnTriggerDetected
TriggerEvent OnTriggerExited
GazeEvent OnGazeDetected

Properties

bool IsGazing [get]
 Whether a valid gaze target is currently detected.
GameObject GazeTarget [get]
 Target of gaze.
bool IsTriggered [get]
 Whether a valid trigger event has occured.
float GazeConfidence [get]
 Confidence of gaze.
LemmingProxyData Data [get]
 Cached snapshot of the current proxy state.
LemmingRelationshipInfo RelationshipInfo [get]
 Cached access to the underlying relationship's data struct.

Private Member Functions

void Awake ()
void Update ()
void OnTriggerEnter (Collider other)
 When a trigger is encountered, and trigger tracking is active, check to see if the tag of the trigger is part of the list of valid tags.
void OnTriggerExit (Collider other)
 When a trigger is exited, and trigger tracking is active, check to see if the tag of the trigger is part of the list of valid tags.
void UpdateGazeTarget ()
 Performs a forward raycast from this proxy's transform to detect gaze targets. Calculates directional confidence and invokes an event if matched.
void OnValidate ()

Private Attributes

SphereCollider sphereCollider
 Used to define and access a collider if one does not already exist.
Collider myCollider
 If a collider already exists, this is a way to access it, if one does not, then the sphere collider is used for this.
bool _isTriggered
 Is the proxy currently triggered.
GameObject _triggerSource
 What is the source of the triggering event.
GameObject _gazeTarget
 What object was just gazed upon.
float _gazeConfidence
 How confident in that gaze is the system.

Detailed Description

A MonoBehaviour that represents the spatial location and rotation of a LemmingRelationship. It provides support for spatial interaction detection such as gaze and triggers, and exposes that data via structured fields and UnityEvents.

Member Function Documentation

◆ OnTriggerEnter()

void Lemmings.LemmingRelationshipProxy.OnTriggerEnter ( Collider other)
inlineprivate

When a trigger is encountered, and trigger tracking is active, check to see if the tag of the trigger is part of the list of valid tags.

Parameters
otherThe Colliding object

The documentation for this class was generated from the following file:
  • Assets/Lemmings/Scripts/Classes/LemmingRelationshipProxy.cs