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

Description

Vive Tracker used on the torso of a Humanoid

Unity Inspector

A Vive Tracker can be placed on the hips. In this position the orientation of the tracker is not used, so it is not important how the tracker is rotated around the Vive logo (forward direction).

Inheritance diagram for Passer.Humanoid.ViveTrackerTorso:
Passer.Humanoid.CustomTorso

Public Types

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

Public Member Functions

override void CheckSensor (HipsTarget hipsTarget)
 
override void SetSensor2Target ()
 Updates the torso targets based on the current sensor position and rotation.
 
override void UpdateSensorTransformFromTarget (Transform _)
 Updates the sensor position and rotation based on the current position of the torso targets.
 
override void Start (HumanoidControl _humanoid, Transform targetTransform)
 Prepares the torso for tracking with the sensor.
 
override void Update ()
 Updates the torso targets based on the status of the tracked sensor.
 

Static Public Member Functions

static Rotation CalculateBoneRotation (Vector bonePosition, Vector parentBonePosition, Vector upDirection)
 

Public Attributes

TorsoBones attachedBone = TorsoBones.Hips
 The bone on the torso controlled by the sensor.
 
TargetData chest
 
TargetData spine
 
TargetData hips
 
DeviceView device
 The device to which the sensor belongs.
 
Tracker.Status status = Tracker.Status.Unavailable
 Status of the sensor.
 

Protected Member Functions

override void CreateSensorTransform ()
 
override void UpdateTarget (HumanoidTarget.TargetTransform target, SensorComponent sensorComponent)
 
void UpdateSensor ()
 

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]
 
Vector localSensorPosition [get]
 
Rotation localSensorRotation [get]
 
Vector sensorPosition [get]
 
Rotation sensorRotation [get]
 
float positionConfidence [get]
 
float rotationConfidence [get]
 
Vector sensor2TargetPosition [get, set]
 
Rotation sensor2TargetRotation [get, set]
 

Member Function Documentation

◆ UpdateSensorTransformFromTarget()

override void Passer.Humanoid.CustomTorso.UpdateSensorTransformFromTarget ( Transform  _)
inherited

Updates the sensor position and rotation based on the current position of the torso targets.

Parameters
_Not used

◆ Start()

override void Passer.Humanoid.CustomTorso.Start ( HumanoidControl  _humanoid,
Transform  targetTransform 
)
inherited

Prepares the torso for tracking with the sensor.

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

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

◆ Update()

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

Updates the torso targets based on the status of the tracked sensor.

Reimplemented from Passer.Humanoid.Tracking.Sensor.


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