Change in behavior of GUI observables between current version and 4.21

This is an issue I discovered while using the custom joystick, which behaves as expected on playground version 4.2.1 but not on the latest Babylon version.

The joystick used to be smooth and responsive, but on the latest version is choppy and doesn’t even react to clicking in the joystick center.

Here is a playground link to the custom joystick example: https://playground.babylonjs.com/#C6V6UY#5

If you select the previous version of 4.2.1:
Clicking in the center of the joystick will produce a colored filled circle, a “puck”, as the code says. You can drag your pointer anywhere inside the large circle and the puck will immediately follow your pointer movement.

Now select the current version of 5.18.0:
Clicking in the center of the joystick does NOT create a “puck”. Only clicking in the outer circle creates a puck. Drag your pointer around and you’ll notice that the puck does not immediately follow your pointer but seems to be stuck in place until it snaps in place with a delay.

1 Like

Hello,

I notice this effect today also. It’s still working on 5.8.0 if it can help BabylonJS team to find a solution.

Thank you,

@carolhmj and @RaananW anything you can think of ?

The behavior seems to have changed between 5.15 and 5.17 (5.16 crashed for some reason), might have to do with the changes we made to pointerBlocker to make the behavior more consistent. I’ll check.

1 Like

Yep it’s related to isPointerBlocker changes, now there is no need to set that on the inner controls as that blocks the events from getting into the container: VIRTUALJOYSTICK GUI | Babylon.js Playground (babylonjs.com)

3 Likes

Thank you @carolhmj, I will change code to adapt.