Mesh actionManager + camera control bug

This is a bug we found while creating this animation
It is related to the mobile camera control and uses the
If you run it on mobile, the animation will end and the camera control will not work.

PG

For a more straightforward approach, see this PG
i can’t get a return from a simple settimeout either. (click to sphere)

CC @PolygonalSun - seems to be related to this line:

Babylon.js/packages/dev/core/src/Cameras/Inputs/freeCameraMouseInput.ts at master · BabylonJS/Babylon.js · GitHub

1 Like

Lemme take a look and see if I can verify something here. I think I may know what’s going on.

2 Likes

So, here’s what I found. In your code, you are detaching the controls before the pointerup event is being received so the input still thinks there’s an active touch happening (under the last pointerId) and any new touches will have a different pointerId so they’ll be ignored. That being said, detachControls should still reset all of the values to prevent this. I’ve created a PR to fix that: FreeCameraMosueInput: Reset Active pointerId when detaching controls by PolygonalSun · Pull Request #14065 · BabylonJS/Babylon.js (github.com)

1 Like

PR is merged.

1 Like