# Pressable buttons
This folder contains the scripts necessary for making Interactable buttons that support Speech, Far Interaction and Near Interaction (Physical hand pressing)
## High level description
PhysicalButtonMovement is similar to HandInteractionPress.
It uses External Object Targeting (EOT) to move an Interactable element along a press direction vector.
PhysicalButtonMovement needs a large BoxCollider on the Ignore Raycast layer (which it sets automatically)
It tracks the position of both index tip fingers and uses this to move the button as needed.
## States and events
It then calls into a PhysicalPressEventRouter and calls events related to Touch, Press, Unpress (Default Click), and Untouch.
* Touch: When a finger is contacting with the button.
* Press: After the button has been pressed more than a threshold amount.
* Unpress/Click: When the button has been released while in Press state.
* Untouch: When the finger is no longer touching the button.
The PhysicalPressEventRouter receives events and sets Interactable's InteractableState accordingly.
It also calls OnPointerClicked events, allowing for the PhysicalButtonMovement script to trigger Interactable.OnClicked UnityEvents (which speech/far interaction also execute)
If PhysicalPressEventRouter does not satisfy your use case, you can write your own and utilize it instead.
## Touch button & button cage
Pressable buttons feature a normally invisible mesh called a 'Button Cage' or a 'Button Box'
This mesh has one direction as the button face (Negative Z).
This mesh has a button shader applied to it. The shader observes the position of several global positions (assigned in the GlobalShaderProximityAssigner)
TouchButton triggers the glow splash when the joint positions enter into a collider or meshrenderer's bounds.
## Prefabs
A Prefab is provide in MRTK.Examples/Demos/HandTracking/Prefabs/PressableButtons.
## PhysicalButtonMovement customization
You can customize variables within the PressableButtons, such as the dimensions of the detection box collider.
- PhysicalButtonMovement's box collider can have a variety of dimensions. It usually wants to be several times deeper than the button itself (whose box collider dimensions matter for gaze/far interaction)
- PhysicalButtonMovement's box collider can be larger on the X and Y axes if you want to have a more generous pressable region. This can result in close neighbor buttons getting pressed simultaneously, so be sure to avoid that case.
- PhysicalButtonMovement's Z size controls how deep the user can press before the button is released (a continuous depth press does not trigger a default click). **Be sure to update ButtonSizeRelativeToCollider in PhysicalButtonMovement.cs**
## Dimensions
The sizing of .032 x .032 x .016 Unity units is the default dimensions of a button.
The default sizing of the EOT Collider is .032 x .032 x .128 Unity units. This gives a decent pressable depth even if a developer adjusts the maximum press depth beyond the default .05 Unity units.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Hololens2-3DWebView-Vuplex-example (2000个子文件)
Rotate_L.anim 994KB
Move_L.anim 994KB
Rotate_R.anim 876KB
Move_R.anim 861KB
AirTap_R.anim 778KB
NearSelect_L.anim 746KB
PalmUp_R.anim 579KB
Idle_R.anim 414KB
NearSelect_R.anim 379KB
AirTap_L.anim 301KB
PalmUp_L.anim 297KB
Scroll_L.anim 292KB
Scroll_R.anim 227KB
HandFlip_L.anim 213KB
HandFlip_R.anim 208KB
Idle_L.anim 121KB
SpeechConfirmationLabel.anim 19KB
TeleportCursorDisabled.anim 16KB
TeleportInvalid.anim 14KB
TeleportValid.anim 13KB
Slider_Button_Grab.anim 10KB
Slider_Button_Default.anim 10KB
Slider_Button_Hover.anim 10KB
DefaultCursorNoContext.anim 8KB
Fade_Out_L.anim 7KB
Fade_In_L.anim 7KB
Fade_Out_R.anim 7KB
Fade_In_R.anim 7KB
DefaultCursorIdleRingAnim.anim 4KB
DefaultCursorPressedAnim.anim 4KB
DefaultCursorIdleAnim.anim 4KB
DefaultCursorMoveNortheastSouthwest.anim 2KB
DefaultCursorMoveNorthwestSoutheast.anim 2KB
DefaultCursorRotateHorizontal.anim 2KB
DefaultCursorMoveNorthSouth.anim 2KB
DefaultCursorRotateVertical.anim 2KB
DefaultCursorMoveEastWest.anim 2KB
DefaultCursorMoveCross.anim 2KB
DefaultCursorWaitingAnim.anim 1KB
Microsoft.MixedReality.Toolkit.Providers.XRSDK.asmdef 987B
Microsoft.MixedReality.Toolkit.Providers.XRSDK.WMR.asmdef 808B
Microsoft.MixedReality.Toolkit.SDK.asmdef 776B
Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor.asmdef 749B
Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Editor.asmdef 708B
Microsoft.MixedReality.Toolkit.Editor.Inspectors.asmdef 692B
Microsoft.MixedReality.Toolkit.Editor.ServiceInspectors.asmdef 658B
Microsoft.MixedReality.Toolkit.SDK.Experimental.Inspectors.asmdef 634B
Microsoft.MixedReality.Toolkit.Providers.UnityAR.Editor.asmdef 604B
Microsoft.MixedReality.Toolkit.SDK.Inspectors.asmdef 584B
Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.asmdef 571B
Microsoft.MixedReality.Toolkit.Gltf.Importers.asmdef 569B
Microsoft.MixedReality.Toolkit.Providers.WindowsVoiceInput.asmdef 554B
Microsoft.MixedReality.Toolkit.Services.InputSystem.Editor.asmdef 549B
Microsoft.MixedReality.Toolkit.Providers.ObjectMeshObserver.asmdef 547B
Microsoft.MixedReality.Toolkit.Providers.OpenVR.asmdef 536B
Microsoft.MixedReality.Toolkit.Services.InputSimulation.asmdef 505B
Microsoft.MixedReality.Toolkit.Editor.Utilities.asmdef 504B
Microsoft.MixedReality.Toolkit.Providers.UnityAR.asmdef 482B
Microsoft.MixedReality.Toolkit.Providers.XRSDK.WMR.Editor.asmdef 482B
Microsoft.MixedReality.Toolkit.Editor.BuildAndDeploy.asmdef 479B
Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.ConfigurationChecker.asmdef 456B
Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.asmdef 450B
Microsoft.MixedReality.Toolkit.Providers.UnityAR.ConfigurationChecker.asmdef 444B
Microsoft.MixedReality.Toolkit.Services.InputSystem.asmdef 443B
Microsoft.MixedReality.Toolkit.Providers.XRSDK.ConfigurationChecker.asmdef 442B
Microsoft.MixedReality.Toolkit.asmdef 439B
Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem.asmdef 405B
Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem.asmdef 400B
Microsoft.MixedReality.Toolkit.Services.TeleportSystem.asmdef 397B
Microsoft.MixedReality.Toolkit.Services.BoundarySystem.asmdef 397B
Microsoft.MixedReality.Toolkit.Services.CameraSystem.asmdef 395B
Microsoft.MixedReality.Toolkit.Services.SceneSystem.asmdef 394B
Microsoft.MixedReality.Toolkit.Gltf.asmdef 384B
Microsoft.MixedReality.Toolkit.Editor.ClassExtensions.asmdef 372B
Microsoft.MixedReality.Toolkit.Async.asmdef 331B
MixedRealityToolkit.Services.InputAnimation.asmdef 270B
segoeuib SDF.asset 569KB
segoeuisl SDF.asset 569KB
segoeui SDF.asset 569KB
seguibl SDF.asset 569KB
seguisb SDF.asset 569KB
segoeuil SDF.asset 569KB
DefaultMixedRealityControllerMappingProfile.asset 75KB
ProjectSettings.asset 20KB
PressableRoundButtonColor.asset 15KB
FocusPressTouchGrabTheme.asset 15KB
InputManager.asset 14KB
HolographicButtonFrontPlateThick.asset 14KB
ToggleIconSelected.asset 14KB
ToggleIcon.asset 14KB
Model_IcosaTheme.asset 11KB
PianoKeyThemeBlack.asset 10KB
CoffeeTheme.asset 10KB
CylinderTheme.asset 10KB
PianoKeyThemeWhite.asset 10KB
PressableButtonCubeTheme.asset 10KB
CheeseTheme.asset 10KB
ToggleDotSelected.asset 10KB
DefaultTheme.asset 10KB
ToggleButtonSelected.asset 10KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
RandomValue
- 粉丝: 6
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功