You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the XRPushButton from within a parent gameobject that moves the button seems unresponsive. This is because in the OnStart function m_BaseButtonPosition is set, so the hover logic is basing its calculation on the initial position of the button, so it does "work" but only if you position your hand in the initial location.
I fixed my issue by updating
var localOffset = transform.InverseTransformVector(interactorTransform.position - m_BaseButtonPosition);
to
var localOffset = transform.InverseTransformVector(interactorTransform.position - m_Button.position);
in Unity.XR.Content.Interaction\Assets\XRI_Examples\UI_3D\Scripts\XRPushButton.cs
I realize this might incur performance penalties. I'm also pretty new to Unity so I might be misunderstanding things like the distance calculation mode.
Maybe a best of both worlds approach would be a toggle that enables the user to set the button as static or movable?
The text was updated successfully, but these errors were encountered:
When using the XRPushButton from within a parent gameobject that moves the button seems unresponsive. This is because in the OnStart function m_BaseButtonPosition is set, so the hover logic is basing its calculation on the initial position of the button, so it does "work" but only if you position your hand in the initial location.
I fixed my issue by updating
to
in Unity.XR.Content.Interaction\Assets\XRI_Examples\UI_3D\Scripts\XRPushButton.cs
I realize this might incur performance penalties. I'm also pretty new to Unity so I might be misunderstanding things like the distance calculation mode.
Maybe a best of both worlds approach would be a toggle that enables the user to set the button as static or movable?
The text was updated successfully, but these errors were encountered: