WebXR Controller Event - "selectstart" fired before the controller position/orientation has been updated

Hi, I’m using WebXR, I already read every single post here and tried out every single example available. Now I’m stuck.

My task:
I have to check if the interaction on the scene with the controller start pointing a specific area, so in order to do that I request using the controller to see if the ray hit a the specific placeholder I positioned on the interested area.

Well, if I bind my function on the “select” event there are no problems at all, works as intended.

But, for the next interaction “the dragging” I have to check the raycasting result, while the interaction is ongoing and not finished (and the “select” event is fired at the end of an interaction).

My problem:
The first data I read from the controller on the “selectstart” event are the old data, from the last interaction with the old position and orientation. Seems that the position/orientation in the controller are update just after the “selectstart” event has been thrown (or to be more specific on the next rendering cycle).

Any chances to get it working properly? There is no way to manually update the controller or to wait until the controller get updated?

Thanks

Hi, I am facing the same issue as well. In my case, the controller position/orientation updates after the ‘selectend’ event. Did you manage to find a solution for this?

Hi, I addressed that behavior by implementing a hotfix. I set a flag for the next render cycle to read and update the information (position and orientation) only during that cycle, ensuring that it is up-to-date.