Humanoid Control for Unity v4
|
Vive Tracker used on the leg of a Humanoid
Vive Trackers can be placed on different bones on the arm. This makes it possible to combine a SteamVR controller with a Vive Tracker on the arm to improve the Inverse Kinematics solution. The bone on which the tracker in mounted should be set using the Bone parameter. It is not possible to have both a UnityXR controller and a Vive Tracker on the hand.
Public Types | |
enum | ID { Head , LeftHand , RightHand , Hips , LeftFoot , RightFoot , Tracker1 , Tracker2 , Tracker3 , Tracker4 , Count } |
Public Member Functions | |
override void | CheckSensor (HandTarget handTarget) |
override void | SetSensor2Target () |
override void | UpdateSensorTransformFromTarget (Transform _) |
override void | Start (HumanoidControl _humanoid, Transform targetTransform) |
Prepares the arm for tracking with the tracked controller and/or skeleton. | |
override void | Update () |
Updates the arm target based on the status of the tracked controller and/or skeleton. | |
Public Attributes | |
ArmBones | attachedBone = ArmBones.Hand |
The bone on the arm controlled by the sensor. | |
bool | isLeft |
TargetData | shoulder |
TargetData | upperArm |
TargetData | forearm |
TargetData | hand |
Finger | thumb |
Finger | indexFinger |
Finger | middleFinger |
Finger | ringFinger |
Finger | littleFinger |
Finger[] | fingers |
DeviceView | device |
The device to which the sensor belongs. | |
Tracker.Status | status = Tracker.Status.Unavailable |
Status of the sensor. | |
Protected Member Functions | |
HumanoidTarget.TargetedBone | GetTargetBone () |
override void | CreateSensorTransform () |
void | UpdateControllerInput () |
Updates the Controller Input for this side. | |
virtual void | UpdateControllerInput (ControllerSide controllerSide) |
Updates one side of the ControllerInput from the values of the tracked ControllerComponent. | |
override void | UpdateHandFromSkeleton () |
This function uses the tracked HandSkeleton to update the pose of the hand. | |
virtual void | UpdateHand () |
void | UpdateSensor () |
Properties | |
override string | name [get] |
override HumanoidTracker | tracker [get] |
ViveTrackerComponent | viveTracker [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] |
|
inherited |
Prepares the arm for tracking with the tracked controller and/or skeleton.
_humanoid | The humanoid for which this arm is tracked |
targetTransform | The transform of the hand target |
This will find and initialize the controllerInput for the given humanoid. It will initialize the sensor2TargetPosition and sensor2TargetRotation values. It will determine whether the sensor should be shown and rendered. It will start the tracking for the controller and/or hand skeleton.
|
virtualinherited |
Updates the arm target based on the status of the tracked controller and/or skeleton.
Reimplemented from Passer.Humanoid.Tracking.Sensor.
|
protectedvirtualinherited |
Updates one side of the ControllerInput from the values of the tracked ControllerComponent.
controllerSide | The controller side to update |
This function does nothing when the controller is not available or not tracking.
|
protectedinherited |
This function uses the tracked HandSkeleton to update the pose of the hand.
This function does nothing when the hand skeleton is not available or not tracking.