MRTK - Maximum number of 64 colliders found in PokePointer overlap query

早过忘川 提交于 2021-01-29 18:18:37

问题


I am trying to build a color selection list in my personal project, with 48 * PressableButtonHoloLens2 + GridObjectCollection. When I run and hover with the simulated fingertip, the editor gives me these warning messages.

Q1: Is this because too many buttons are too close to each other? Or just the number of the buttons with collider is over 64? The message says 'Consider increasing the query buffer size in the pointer profile'

Q2: Where can I increase the buffer size? I don't see any 'Buffer size' field in the pointer profile.

Q3: Would it decrease performance? (increasing the buffer size)

Warning message

Maximum number of 64 colliders found in PokePointer overlap query. Consider increasing the query buffer size in the pointer profile. UnityEngine.Debug:LogWarning(Object) Microsoft.MixedReality.Toolkit.Input.PokePointer:FindClosestTouchableForLayerMask(LayerMask, BaseNearInteractionTouchable&, Single&, Vector3&) (at Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs:169) Microsoft.MixedReality.Toolkit.Input.PokePointer:OnPreSceneQuery() (at Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs:127) Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointer(PointerData) (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:878) Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointers() (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:841) Microsoft.MixedReality.Toolkit.Input.FocusProvider:Update() (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:518) Microsoft.MixedReality.Toolkit.<>c:b__60_0(IMixedRealityService) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServices(IEnumerable1, Action1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:969) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action`1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:950) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:UpdateAllServices() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:Update() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:580)

To reproduce

  1. Create an empty game object
  2. Put 48 x PressableButtonHoloLens2 prefabs under it
  3. Assign GridObjectCollection to the parent
  4. Update layout (cell width x height = 0.032)
  5. Run and hover with simulated hand.

Expected behavior

No warning messages

Your Setup (please complete the following information)

  • Unity Version [e.g. 2018.4.6f1]
  • MRTK Version [e.g. v2.0.0]

https://github.com/microsoft/MixedRealityToolkit-Unity/issues/6052


回答1:


Q1: Is this because too many buttons are too close to each other? Or just the number of the buttons with collider is over 64? The message says 'Consider increasing the query buffer size in the pointer profile'

It is because there are too many buttons close to each other.

Q2: Where can I increase the buffer size? I don't see any 'Buffer size' field in the pointer profile.

You can do this in the PokePointer prefab, in the PokePointer script, look for "Scene Query Buffer Size" field.

Q3: Would it decrease performance? (increasing the buffer size)

Yes I anticipate it would, though unclear how much relative to other components in the scene. Note that the poke pointer does run queries every frame, at least one per hand.



来源:https://stackoverflow.com/questions/58074113/mrtk-maximum-number-of-64-colliders-found-in-pokepointer-overlap-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!