Component representing a tracked Lemming attached to a GameObject.
More...
Inherits MonoBehaviour, and Lemmings.ILemming.
|
|
void | UpdateSmoothedVelocity () |
| float | GetConfidence () |
| | Returns the confidence score for this Lemming. TODO: This function should check for dropped tracking over a period of time and reflect that.
|
|
|
GameObject | objectToTrack |
| | This is a field for a gameObject that you wish the Lemming to track. It is generally easier to simply let the Lemming be the main object that is used to define relationships but in cases where a hierarchy is particularly complex, or it makes the project cleaner, you can add an object to this field and it will be used to evaluate Lemming Relationships.
|
|
|
Vector3 | SmoothedVelocity [get, private set] |
|
Vector3 | Velocity [get] |
|
GameObject | matchTarget [get] |
| | Read-Only accessor for the object this Lemming is matching.
|
|
bool | followingObject [get] |
| | True if the Lemming is tracking an external GameObject (via objectToTrack). False if it is using its own transform as the tracked reference.
|
| string | Name [get] |
| | The assigned name of the Lemming. This inherits from a serialized private field.
|
|
string | name [get] |
| | This is a backup in case name is called with lowercase letters.
|
|
string | DefaultName [get] |
| | When the name is never entered manually and the lemming is accessed remotely, it leads to a null result, this is a backup that uses the name of the gameobject to resolve.
|
| GameObject | Source [get] |
| | The GameObject this Lemming refers to. Pulls the gameobject this script is a component of.
|
|
float | Confidence [get] |
| | The confidence value (0 to 1) for this Lemming. Placeholder implementation until dynamic evaluation is implemented. TODO: The confidence should be updatable by users testing the tracking of potential features.
|
|
bool | HasValidShepherd [get] |
| | Returns true if this Lemming is under a valid LemmingContainer in the hierarchy.
|
|
|
void | Awake () |
|
void | Update () |
| | If this is matching a tracked object then update these values each frame.
|
|
void | Start () |
|
void | OnDestroy () |
|
void | RegisterWithShepherd () |
| | This is the registration event with the Lemming Shepherd TODO: There may be additional check required here, such as ensuring that HasValidShepherd is true.
|
|
|
string | referenceName |
|
float | confidence = 1f |
|
int | velocitySampleSize = 10 |
|
readonly Queue< Vector3 > | velocitySamples = new() |
|
Vector3 | lastPosition |
|
float | lastTime |
|
Rigidbody | rb |
Component representing a tracked Lemming attached to a GameObject.
◆ GetConfidence()
| float Lemmings.Lemming.GetConfidence |
( |
| ) |
|
|
inline |
Returns the confidence score for this Lemming. TODO: This function should check for dropped tracking over a period of time and reflect that.
- Returns
- A float between 0 and 1 representing confidence.
Implements Lemmings.ILemming.
◆ Name
| string Lemmings.Lemming.Name |
|
get |
◆ Source
| GameObject Lemmings.Lemming.Source |
|
get |
The GameObject this Lemming refers to. Pulls the gameobject this script is a component of.
Implements Lemmings.ILemming.
The documentation for this class was generated from the following file:
- Assets/Lemmings/Scripts/Classes/Lemming.cs