Skip to content

Commit

Permalink
Merge branch 'develop' into feature/Simplify_specific_Bone_and_Finger…
Browse files Browse the repository at this point in the history
…_access
  • Loading branch information
MattGrayUL committed May 31, 2024
2 parents 16c4399 + 93f9580 commit d8f534b
Show file tree
Hide file tree
Showing 28 changed files with 280 additions and 1,924 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ namespace Leap.Unity.Preview.Locomotion
/// <summary>
/// Used in conjunction with JumpGemTeleport, a Jump Gem can be pinched, aimed and released in order to teleport
/// </summary>
[RequireComponent(typeof(LightweightPinchDetector))]
[RequireComponent(typeof(PinchDetector))]
public class JumpGem : MonoBehaviour
{
#region Editor Settings

public LeapProvider leapProvider;

[SerializeField, Header("Pinch")]
protected LightweightPinchDetector _pinchDetector = null;
public LightweightPinchDetector PinchDetector => _pinchDetector;
protected PinchDetector _pinchDetector = null;
public PinchDetector PinchDetector => _pinchDetector;

[SerializeField, Tooltip("This dictates the required pinch value and overall size of the visual elements used. " +
"This value is a radius and will be used *0.5 on visual items.")]
Expand Down Expand Up @@ -619,7 +619,7 @@ private void OnValidate()

if (_pinchDetector == null)
{
_pinchDetector = GetComponent<LightweightPinchDetector>();
_pinchDetector = GetComponent<PinchDetector>();
}
if (_pinchDetector != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PinchToTeleport : TeleportActionBase
private IsFacingObject _isFacingObject;

[SerializeField]
private LightweightPinchDetector _pinchDetector;
private PinchDetector _pinchDetector;

[Tooltip("The chirality which will be used for pinch to teleport. This will update the chirality in the pinch detector and hand ray.")]
public Chirality chirality;
Expand Down Expand Up @@ -194,7 +194,7 @@ private void OnValidate()

if (_pinchDetector == null)
{
_pinchDetector = GetComponentInChildren<LightweightPinchDetector>(true);
_pinchDetector = GetComponentInChildren<PinchDetector>(true);
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions Packages/Tracking/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Support for reading the camera matrix
- ImageRetriever allows more than 6 reconnections

### Changed
- Improved XRHands support for Meta Aim Input Actions
- XRLeapProviderManager renamed LEAP_DIRECT to ULTRALEAP
- Accessors for Hand.Finger, Hand.Bone and Finger.Bone
- Renamed BoneType enum entries to remove redundancies

### Fixed
- Issue with the method signature for LeapPixelToRectilinearEx
- Duplicate meta aim hands when using XRHands Input
- Editor stuck in unending loop when no service running

## [6.15.0] - 19/04/24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ public static void GetStatus()
if (lastRequestTimestamp + requestInterval < Time.realtimeSinceStartup)
{
IntPtr statusPtr = new IntPtr();
LeapC.GetServerStatus(1000, ref statusPtr);
LeapC.GetServerStatus(500, ref statusPtr);

lastStatus = Marshal.PtrToStructure<LeapC.LEAP_SERVER_STATUS>(statusPtr);
if (statusPtr != IntPtr.Zero)
{
lastStatus = Marshal.PtrToStructure<LeapC.LEAP_SERVER_STATUS>(statusPtr);

MarshalUnmananagedArray2Struct(lastStatus.devices, (int)lastStatus.device_count, out lastDevices);
LeapC.ReleaseServerStatus(ref lastStatus);
}

MarshalUnmananagedArray2Struct(lastStatus.devices, (int)lastStatus.device_count, out lastDevices);
LeapC.ReleaseServerStatus(ref lastStatus);
lastRequestTimestamp = Time.realtimeSinceStartup;
}
}
Expand Down Expand Up @@ -97,7 +101,7 @@ public static string GetDeviceType(string _serial)
return "";
}

public static void MarshalUnmananagedArray2Struct<T>(IntPtr unmanagedArray, int length, out T[] mangagedArray)
static void MarshalUnmananagedArray2Struct<T>(IntPtr unmanagedArray, int length, out T[] mangagedArray)
{
var size = Marshal.SizeOf(typeof(T));
mangagedArray = new T[length];
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d8f534b

Please sign in to comment.