From d60457515eb33fd1eb3e33ac1fe373e2eb4a11fe Mon Sep 17 00:00:00 2001 From: Dino Fejzagic Date: Sat, 11 Apr 2020 14:34:29 +0200 Subject: [PATCH] Create default hand interaction for spatial pointer pose (#516) --- .../Controllers/Hands/BaseHandController.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/Hands/BaseHandController.cs b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/Hands/BaseHandController.cs index 5cc32dd3a..04defa98c 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/Hands/BaseHandController.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/Hands/BaseHandController.cs @@ -5,6 +5,7 @@ using UnityEngine; using XRTK.Definitions.Controllers.Hands; using XRTK.Definitions.Devices; +using XRTK.Definitions.InputSystem; using XRTK.Definitions.Utilities; using XRTK.Interfaces.InputSystem; using XRTK.Interfaces.Providers.Controllers; @@ -37,6 +38,18 @@ public BaseHandController(IMixedRealityControllerDataProvider dataProvider, Trac private Vector3 lastPalmNormal; private Vector3 lastPalmPosition; + /// + public override MixedRealityInteractionMapping[] DefaultInteractions { get; } = + { + new MixedRealityInteractionMapping(0, "Spatial Pointer Pose", AxisType.SixDof, DeviceInputType.SpatialPointer, MixedRealityInputAction.None) + }; + + /// + public override MixedRealityInteractionMapping[] DefaultLeftHandedInteractions => DefaultInteractions; + + /// + public override MixedRealityInteractionMapping[] DefaultRightHandedInteractions => DefaultInteractions; + /// /// Gets the current palm normal of the hand controller. ///