-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for input and gestures for hand controllers #164
Conversation
…e/hand-input # Conflicts: # XRTK.SDK/Packages/com.xrtk.sdk/Profiles~/Input/DataProviders/GenericOpenVRController/Left/SpatialPointerProfile.asset # XRTK.SDK/Packages/com.xrtk.sdk/Profiles~/Input/DataProviders/GenericOpenVRController/Left/SpatialPointerProfile.asset.meta # XRTK.SDK/Packages/com.xrtk.sdk/Profiles~/Input/DataProviders/GenericOpenVRController/Right/SpatialPointerProfile.asset # XRTK.SDK/Packages/com.xrtk.sdk/Profiles~/Input/DataProviders/GenericOpenVRController/Right/SpatialPointerProfile.asset.meta
...es~/Input/DataProviders/HandControllers/Simulated/Left/YawCounterClockwiseProfile.asset.meta
Outdated
Show resolved
Hide resolved
...com.xrtk.sdk/Runtime/Features/UX/Scripts/Controllers/Hands/HandControllerJointsVisualizer.cs
Outdated
Show resolved
Hide resolved
...s/com.xrtk.sdk/Runtime/Features/UX/Scripts/Controllers/Hands/BaseHandControllerVisualizer.cs
Outdated
Show resolved
Hide resolved
… feature/hand-input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
...ofiles~/Input/DataProviders/HandControllers/SimulatedHandControllerDataProviderProfile.asset
Outdated
Show resolved
Hide resolved
/// </summary> | ||
[System.Runtime.InteropServices.Guid("0B653537-D237-4622-ACC6-E351209A5882")] | ||
public class HandControllerJointsVisualizer : BaseHandControllerVisualizer | ||
public class HandControllerJointsVisualizer : MonoBehaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably still need the guid, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think. This is now just a plain MonoBehaviour component in the SDK. It's not being assigned in the controller visualization profiles.
// gets updated before raising the event. If we don't update | ||
// the focus provider here, the event will not be raised on the | ||
// capture near interaction object. | ||
MixedRealityToolkit.InputSystem.FocusProvider.Update(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StephenHodgson when you have some time could you please comment on this. I don't like this change at all but it's the only way to currently make near interaction work.
I didn't see a way to make it work without touching the FocusProviders itself and other components of the input system. In general I think we need to stop making these ad-hoc changes for near interaction and come up with a proper concept and data flow for near interaction to work. It doesn't feel quite there yet. I think what you did so far is a good starting point but upon debugging I found there is still more work to do to make this work. It's not enough to just register OnTriggerEnter()
etc. We need to properly handle the focus change as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially what happens here is that I have to force an update / raycast on the focus provider before RaiseOnInput...
. If I don't do this, the input event will not be raised on CapturedNearInteractionObject
but instead on whatever the pointer was focusing before.
* Move SDK asm definition to correct plact * Fix recorded poses assets * Fix simulation profiles * Assign default tracked poses * Copy over SDK changes * fixed visualization references * Undo GUID change * Restore recorded hand pose JSON assets lost by merge * Fix NRE for spatial pointer mapping * Re-init simulated hand defaults * Remove open steady pose * Update hand pointer profile * Update defaults for runtime hands * Moved WMR hand data provider profile to WMR module * Reduce profile redundancy a bit * Fix visualized joint rotations * Moved simulated hand data provider profile * Moved WMR profile to WMR module * Update profiles * Updated profiles * changes for near pointer interactions using collision * removed unused reference * Update BaseControllerPointerInspector.cs (#175) * Update index finger pose mapping for hands * Use triggers instead of physics colliders * Update BaseControllerPointer.cs * Create hand near poniter prefab (temp?) * only raise pointer events if we have a valid pointer target * revert * Delete surface touch prefab * Create near pointer prefab variant * Introduce hand rendering mode * Implement visuailzation runtime switch and update prefabs * Fix none rendering mode * Fix existing joints not enabled on enable * Update prefabs * Remove redundant check * Create custom pointer prefab for hands * Implement runtime physics toggle * Implement runtime bounds mode selection * Fix visuailzation script guid reference * Reduce hand mass * Set hand weight to average human hand weight * Update assets * Update IsNearPointerIdle computed property * Implement spatial pointer transform * Update pointer mesh * Use local position only for joint poses * Add debug utility to record hand data * Goodbye NONE joint * Rename joints * Update default hand interactions * Sync simulation profiles * reserialized json data to exclude reference types (#192) Fixed build errors from hand data recorder updated log for near pointer * Fix NRE in case tip prefab does not have a renderer * updated spatial pointer from update loop to use input changed event (#193) removed commented out stuff from near pointer removed empty near pointer inspector updated pointer inspectors to fallback if no inspector is made for derived types * override interaction modes for hand near/spatial pointers * updated prefab serialization * Bake default poses * Add tracked hand pose input action * Update baked data for hand poses * Fix spatial pointer disabled while interacting * Fix spatial pointer line renderer start offset * Fix rotation not set in local space * Adjust spatial pointer mesh renderer settings * Only update hand visusalization if hand is tracked * Optimize foreach loop to for loop * Get mesh data using TryGetHandMeshData * Remove HandData input event * Fix physics companion pose not updated * Remove tracked pose raw input action * Fix hand controller profiles default mappings * Set graphics quality to highest for vr devices * Fix interaction mappings for hand controllers * Fix near pointer target not updated * Temporarily change hand prefabs for better debugging * Make colliders dict readonly * Remove debug hand visualization Co-authored-by: Stephen Hodgson <hodgson.designs@gmail.com>
Overview
Companion PR to XRTK/com.xrtk.core#552