Humanoid Control for Unity v4
|
Leap Motion enables detailed hand tracking with markerless optical detection. Individual finger movements can be tracked.
Leap Motion is supported in Humanoid Control Plus and Pro
HMD mounted Leap Motion is supported when it is mounted on Oculus Rift, HTC Vive or Windows Mixed Reality using the Leap Motion VR Developer Mount.
Leap Motion is supported on Microsoft Windows 10.
Leap Motion software version 4 or higher is required
For Leap Motion to work, the Leap Motion Unity Core Assets needs to be imported into the project. Go to Edit Menu->Preferences->Humanoid Control and look for the Leap Motion Support entry.
Click the button to go to the download page for the Leap Motion assets. From the SDK, you only need to import the core.unitypackage.
After the assets have been imported, Leap Motion Support will be enabled automatically in the preferences.
To enable tracking with Leap Motion for a humanoid, Leap Motion needs to be enabled in the HumanoidControl Component:
By default the LeapMotion object is not visible in the scene, but it will be created automatically when the scene starts. If the button Show is pressed, the Leap Motion object will be created in the Real World object.
Leap Motion (LeapMotion) is a reference to the object in the scene representing the Leap Motion Sensor. This GameObject is found as a child of the Real World GameObject. It is only rendered in the scene when HumanoidControl->Settings->Show Real Objects has been enabled. The LeapMotion GameObject can be used to set the position of the tracking relative to the player in the scene.
Public Types | |
enum | Status { Unavailable , Present , Tracking } |
The tracking status. More... | |
Public Member Functions | |
override void | CheckTracker (HumanoidControl humanoid) |
Check the presence of a LeapMotion object and creates one if it does not exist. | |
void | CheckTrackerOnHmd (HumanoidControl humanoid, TrackerGetter getTracker, Vector3 localPosition, Quaternion localRotation) |
Function to check the status of a specific tracker. | |
override void | StartTracker (HumanoidControl _humanoid) |
Start the tracker. | |
override void | StopTracker () |
Stop the tracker. | |
override void | UpdateTracker () |
Update the tracker state. | |
void | PlaceTrackerTransform (bool isHeadMounted) |
void | SetTrackerToTarget () |
void | UpdateTrackerFromTarget (bool isHeadMounted) |
void | CheckTracker (HumanoidControl humanoid, TrackerGetter getTracker) |
Function to check the status of a specific tracker. | |
void | CheckTracker (HumanoidControl humanoid, TrackerGetter getTracker, Vector3 localPosition, Quaternion localRotation) |
Function to check the status of a specific tracker. | |
delegate TrackerComponent | TrackerGetter (Transform transform, Vector3 localPosition, Quaternion localRotation) |
Function delegate for retrieving the tracker. | |
virtual Vector3 | GetBonePosition (uint actorId, FacialBone boneId) |
virtual Quaternion | GetBoneRotation (uint actorId, FacialBone boneId) |
virtual float | GetBoneConfidence (uint actorId, FacialBone boneId) |
virtual void | StartTracker () |
Optional list of SubTrackers. | |
virtual void | ShowTracker (bool shown) |
Show or hide the Tracker renderers. | |
virtual void | Calibrate () |
Calibrate the tracker. | |
virtual void | AdjustTracking (Vector3 positionalDelta, Quaternion rotationalDelta) |
Adjust the position of the tracker by the given delat. | |
Public Attributes | |
LeapDevice | device |
bool | isHeadMounted = true |
Is the LeapMotion mounted on an HMD? | |
HumanoidControl | humanoid |
The humanoid for this tracker. | |
bool | enabled |
Is this tracker enabled? | |
Status | status |
The tracking Status of the tracker. | |
TrackerComponent | trackerComponent |
The tracking device. | |
Protected Attributes | |
bool | useLeapPackage = false |
Vector3 | headTrackerPosition |
Quaternion | headTrackerRotation |
Properties | |
override string | name [get] |
override ArmSensor | leftHandSensor [get] |
override ArmSensor | rightHandSensor [get] |
override HumanoidSensor[] | sensors [get] |
virtual HeadSensor | headSensor [get] |
Get the sensor for the head. | |
virtual TorsoSensor | hipsSensor [get] |
Get the sensor for the hips. | |
virtual LegSensor | leftFootSensor [get] |
Get the sensor for the left foot. | |
virtual LegSensor | rightFootSensor [get] |
Get the sensor for the right foot. | |
|
inherited |
|
virtual |
Check the presence of a LeapMotion object and creates one if it does not exist.
humanoid | The humanoid for which the tracker needs to be checked |
Reimplemented from Passer.Humanoid.HumanoidTracker.
void Passer.Humanoid.LeapTracker.CheckTrackerOnHmd | ( | HumanoidControl | humanoid, |
TrackerGetter | getTracker, | ||
Vector3 | localPosition, | ||
Quaternion | localRotation | ||
) |
Function to check the status of a specific tracker.
humanoid | The humanoid for which the tracker needs to be checked |
getTracker | Function delegate to retrieve the tracker |
localPosition | The default local position of the tracker |
localRotation | The default local rotation of the tracker |
|
virtual |
Start the tracker.
Reimplemented from Passer.Humanoid.HumanoidTracker.
|
virtual |
Stop the tracker.
Reimplemented from Passer.Tracking.Tracker.
|
virtual |
Update the tracker state.
Reimplemented from Passer.Tracking.Tracker.
|
inherited |
Function to check the status of a specific tracker.
humanoid | The humanoid for which the tracker needs to be checked |
getTracker | Function delegate to retrieve the tracker |
The default position/rotation for the tracker when created will be zero
|
inherited |
Function to check the status of a specific tracker.
humanoid | The humanoid for which the tracker needs to be checked |
getTracker | Function delegate to retrieve the tracker |
localPosition | The default local position of the tracker |
localRotation | The default local rotation of the tracker |
|
inherited |
Function delegate for retrieving the tracker.
transform | The root transform to start the searching of the tracker |
localPosition | The default local position of the tracker |
localRotation | The default local rotation of the tracker |
The default position/rotation is relative to the humanoid's real world.
|
virtualinherited |
Optional list of SubTrackers.
Start the tracker
|
virtualinherited |
Show or hide the Tracker renderers.
shown | Renderers are enabled when shown == true |
|
virtualinherited |
Calibrate the tracker.
Reimplemented in Passer.Humanoid.UnityXRTracker.
|
virtualinherited |
Adjust the position of the tracker by the given delat.
positionalDelta | The positional delta to apply |
rotationalDelta | The rotational delta to apply |
bool Passer.Humanoid.LeapTracker.isHeadMounted = true |
Is the LeapMotion mounted on an HMD?
When enabled, the LeapMotion device will follow the movement of the hmd. And hand tracking will be relative to the hmd.
|
get |
|
get |
|
get |
|
getinherited |
Get the sensor for the head.
Will return null when this sensor is not present
|
getinherited |
Get the sensor for the hips.
Will return null when this sensor is not present
|
getinherited |
Get the sensor for the left foot.
Will return null when this sensor is not present
|
getinherited |
Get the sensor for the right foot.
Will return null when this sensor is not present