Humanoid Control for Unity v4
|
A custom sensor used on the arm of a humanoid.
This tracking option supports a custom developed ControllerComponent or HandSkeleton for the hand and/or arm.
Public Types | |
enum | ID { Head , LeftHand , RightHand , Hips , LeftFoot , RightFoot , Tracker1 , Tracker2 , Tracker3 , Tracker4 , Count } |
Public Member Functions | |
override void | SetSensor2Target () |
Updates the arm 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 arm targets. | |
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 | |
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] |
The name of this sensor. | |
override HumanoidTracker | tracker [get] |
THe tracker for this sensor. | |
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] |
override void Passer.Humanoid.CustomArm.UpdateSensorTransformFromTarget | ( | Transform | _ | ) |
Updates the sensor position and rotation based on the current position of the arm targets.
_ | Not used |
override void Passer.Humanoid.CustomArm.Start | ( | HumanoidControl | _humanoid, |
Transform | targetTransform | ||
) |
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.
|
virtual |
Updates the arm target based on the status of the tracked controller and/or skeleton.
Reimplemented from Passer.Humanoid.Tracking.Sensor.
|
protectedvirtual |
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.
|
protected |
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.