Humanoid Control for Unity v4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Properties | List of all members
Passer.Humanoid.ViveTrackerHead Class Reference

Description

Vive Tracker used on the head of a Humanoid

Unity Inspector

A Vive Tracker can be used on the head instead of an HMD. There is no need to have a UnityXR controller or any camera at all in the scene. It is not possible to have both a Unity XR and Vive Tracker enabled on the head.

Inheritance diagram for Passer.Humanoid.ViveTrackerHead:
Passer.Humanoid.CustomHead Passer.Humanoid.HeadSensor Passer.Humanoid.HumanoidSensor Passer.Humanoid.Tracking.Sensor

Public Types

enum  ID {
  Head , LeftHand , RightHand , Hips ,
  LeftFoot , RightFoot , Tracker1 , Tracker2 ,
  Tracker3 , Tracker4 , Count
}
 

Public Member Functions

override void CheckSensor (HeadTarget headTarget)
 
override void Start (HumanoidControl _humanoid, Transform targetTransform)
 Prepares the head for tracking with the tracked sensor.
 
override void Update ()
 Updates the head target based on the status of the tracke sensor.
 
virtual void Init (HeadTarget headTarget)
 
void InitController (SerializedProperty sensorProp, HeadTarget target)
 
void RemoveController (SerializedProperty sensorProp)
 
virtual void CheckSensorTransform ()
 
virtual void SetSensor2Target ()
 
virtual void UpdateSensorTransformFromTarget (Transform targetTransform)
 
virtual void Stop ()
 
virtual void RefreshSensor ()
 
virtual void ShowSensor (HumanoidTarget target, bool shown)
 

Static Public Member Functions

static Vector3 InverseTransformPointUnscaled (Transform transform, Vector3 position)
 
static Rotation CalculateBoneRotation (Vector bonePosition, Vector parentBonePosition, Vector upDirection)
 

Public Attributes

Vector3 sensor2TargetPosition
 
Quaternion sensor2TargetRotation
 
DeviceView device
 The device to which the sensor belongs.
 
Tracker.Status status = Tracker.Status.Unavailable
 Status of the sensor.
 

Static Public Attributes

const string _name = ""
 

Protected Member Functions

virtual void CreateSensorTransform (string resourceName, Vector3 sensor2TargetPosition, Quaternion sensor2TargetRotation)
 
virtual void CreateSensorTransform ()
 
void CreateSensorTransform (Transform targetTransform, string resourceName, Vector3 _sensor2TargetPosition, Quaternion _sensor2TargetRotation)
 
virtual void UpdateNeckTargetFromHead ()
 
void RemoveSensorTransform ()
 
void UpdateSensorTransform (Tracking.Sensor sensor)
 
virtual void UpdateTargetTransform ()
 
virtual void UpdateTarget (HumanoidTarget.TargetTransform target, Transform sensorTransform)
 
virtual void UpdateTarget (HumanoidTarget.TargetTransform target, SensorComponent sensorComponent)
 
Vector3 GetTargetPosition (Transform sensorTransform)
 
Quaternion GetTargetRotation (Transform sensorTransform)
 
void UpdateSensor ()
 

Static Protected Member Functions

static Vector3 TransformPointUnscaled (Transform transform, Vector3 position)
 

Protected Attributes

Vector _localSensorPosition
 
Rotation _localSensorRotation
 
Vector _sensorPosition
 
Rotation _sensorRotation
 
float _positionConfidence
 Tracking confidence.
 
float _rotationConfidence
 
Vector _sensor2TargetPosition = Vector.zero
 The position of the tracker relative to the origin of the object it is tracking.
 
Rotation _sensor2TargetRotation = Rotation.identity
 

Properties

override string name [get]
 
override HumanoidTracker tracker [get]
 
ViveTrackerComponent viveTracker [get]
 
HeadTarget headTarget [get]
 
HumanoidControl humanoid [get]
 
Vector localSensorPosition [get]
 
Rotation localSensorRotation [get]
 
Vector sensorPosition [get]
 
Rotation sensorRotation [get]
 
float positionConfidence [get]
 
float rotationConfidence [get]
 

Member Function Documentation

◆ CheckSensor()

override void Passer.Humanoid.ViveTrackerHead.CheckSensor ( HeadTarget  headTarget)
virtual

Reimplemented from Passer.Humanoid.HeadSensor.

◆ Start()

override void Passer.Humanoid.CustomHead.Start ( HumanoidControl  _humanoid,
Transform  targetTransform 
)
virtualinherited

Prepares the head for tracking with the tracked sensor.

Parameters
_humanoidThe humanoid for which this head is tracked
targetTransformThe transform of the head target

It will initialize the sensor2TargetPosition and sensor2TargetRotation values. It will determine whether the sensor should be shown and rendered. It will start the tracking of the sensor.

Reimplemented from Passer.Humanoid.HumanoidSensor.

◆ Update()

override void Passer.Humanoid.CustomHead.Update ( )
virtualinherited

Updates the head target based on the status of the tracke sensor.

Reimplemented from Passer.Humanoid.Tracking.Sensor.


The documentation for this class was generated from the following file: