Skip to content

Commit

Permalink
Merge pull request #1508 from ultraleap/bug/UNITY-1246-DeviceTransfor…
Browse files Browse the repository at this point in the history
…m_Leap2_windows

include and use LeapC API for device transform available
  • Loading branch information
MattGrayUL committed Sep 27, 2023
2 parents baa51d8 + 4bb6eea commit 808ba16
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Packages/Tracking Preview/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "com.ultraleap.tracking.preview",
"version": "6.12.0",
"version": "6.12.1",
"description": "Ultraleap Tracking Preview",
"displayName": "Ultraleap Tracking Preview",
"unity": "2021.3",
"license": "Apache-2.0",
"dependencies": {
"com.ultraleap.tracking": "6.12.0",
"com.ultraleap.tracking": "6.12.1",
"com.unity.inputsystem": "1.5.0"
},
"keywords": [
Expand All @@ -23,8 +23,8 @@
},
"samples": [
{
"displayName": "Examples",
"description": "A collection of examples for the Preview package",
"displayName": "Preview Examples",
"description": "A collection of examples for the Ultraleap Tracking Preview package",
"path": "Examples~"
}
]
Expand Down
40 changes: 40 additions & 0 deletions Packages/Tracking/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[docs-website]: https://docs.ultraleap.com/unity-api/ "Ultraleap Docs"

## [6.12.1] - 28/09/23

### Tracking Client versions
- Windows v5.16.0
- MacOS v5.16.0
- Android v5.16.0

### Fixed
- (leapXRServiceProvider) Hands offset incorrectly on Windows when using Leap 2

### Known issues
- Use of the LeapCSharp Config class is unavailable with v5.X tracking service
- Repeatedly opening scenes can cause memory use increase
- Currently the Ultraleap Hand Tracking feature for OpenXR requires the New and Legacy input systems to be enabled, to simultaneously use OpenXR and the Ultraleap Unity Plugin's features.
- The OpenXR Leap Provider does not currently support the `Confidence` hand property (and will return fixed values)
- After using Ultraleap OpenXR in Unity Editor, the tracking mode of device 0 will be set to HMD until the Unity Editor session ends. This can stop the testing of non-XR scenes until the Unity Editor is re-opened
- Running both the Ultraleap XRHands Subsystem and another XRHands Subsystem at the same time causes unstable results. Only enable one at a time.


## [6.12.0] - 12/09/23

### Added
- (MRTK Support) Added an MRTK3 subsystem for using Leap tracking directly (non-OpenXR)

### Changed
- (XRHands) XRHands subsystem will now use existing LeapXRServiceProviders found in the scene before considering generating new ones

### Fixed
- (XRHands) XRHands double-translates tracking data causing XRI InputActions to be wrongly positioned when the XROrigin is moved

### Known issues
- Use of the LeapCSharp Config class is unavailable with v5.X tracking service
- Repeatedly opening scenes can cause memory use increase
- Currently the Ultraleap Hand Tracking feature for OpenXR requires the New and Legacy input systems to be enabled, to simultaneously use OpenXR and the Ultraleap Unity Plugin's features.
- The OpenXR Leap Provider does not currently support the `Confidence` hand property (and will return fixed values)
- After using Ultraleap OpenXR in Unity Editor, the tracking mode of device 0 will be set to HMD until the Unity Editor session ends. This can stop the testing of non-XR scenes until the Unity Editor is re-opened
- The OpenXR Leap Provider palm can be in unexpected position when using pre-1.4.3 OpenXR Layer. A workaround is to ensure you use 1.4.3 or newer - installed by the 5.12.0 or newer Tracking Service Installer
- Running both the Ultraleap XRHands Subsystem and another XRHands Subsystem at the same time causes unstable results. Only enable one at a time.


## [6.12.0] - 12/09/23

### Added
Expand Down
Git LFS file not shown
9 changes: 9 additions & 0 deletions Packages/Tracking/Core/Runtime/Plugins/LeapCSharp/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ public Pose DevicePose
return devicePose;
}

bool deviceTransformAvailable = LeapC.GetDeviceTransformAvailable(Handle);

if (!deviceTransformAvailable)
{
devicePose = Pose.identity;
poseSet = true;
return Pose.identity;
}

float[] data = new float[16];
eLeapRS result = LeapC.GetDeviceTransform(Handle, data);

Expand Down
3 changes: 3 additions & 0 deletions Packages/Tracking/Core/Runtime/Plugins/LeapCSharp/LeapC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ public static eLeapRS GetDeviceCount(IntPtr hConnection, out UInt32 deviceCount)
[DllImport("LeapC", EntryPoint = "LeapGetDeviceInfo", CharSet = CharSet.Ansi)]
public static extern eLeapRS GetDeviceInfo(IntPtr hDevice, ref LEAP_DEVICE_INFO info);

[DllImport("LeapC", EntryPoint = "LeapDeviceTransformAvailable")]
public static extern bool GetDeviceTransformAvailable(IntPtr hDevice);

[DllImport("LeapC", EntryPoint = "LeapGetDeviceTransform")]
public static extern eLeapRS GetDeviceTransform(IntPtr hDevice, [MarshalAs(UnmanagedType.LPArray, SizeConst = 16)] float[] transform);

Expand Down
4 changes: 2 additions & 2 deletions Packages/Tracking/Core/Runtime/Plugins/MacOS/libLeapC.dylib
Git LFS file not shown
4 changes: 2 additions & 2 deletions Packages/Tracking/Core/Runtime/Plugins/x86_64/LeapC.dll
Git LFS file not shown
6 changes: 3 additions & 3 deletions Packages/Tracking/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.ultraleap.tracking",
"version": "6.12.0",
"version": "6.12.1",
"description": "Ultraleap's Unity Plugin enables the data produced by Ultraleap tracking hardware to be used by developers inside their Unity projects. It includes various utilities and prefabs that make it as easy as possible to design and use hand tracking in XR projects",
"displayName": "Ultraleap Tracking",
"unity": "2021.3",
Expand All @@ -21,8 +21,8 @@
},
"samples": [
{
"displayName": "Examples",
"description": "",
"displayName": "Interaction Examples",
"description": "A collection of XR and non-XR interaction examples for the Ultraleap Tracking package",
"path": "Examples~"
}
]
Expand Down

0 comments on commit 808ba16

Please sign in to comment.