Move forward in universal camera not working in Chrome

when I press mouse left button (pointerdown event), hold and forward to move, it works in Safari but It doesn’t forward camera in Chrome (Version 84.0.4147.105 (Official Build) (64-bit)):

Babylon.js v4.2.0-alpha.29 - WebGL1

it works for me on Windows and chrome
Do you have any error in the console?

Same with @Deltakosh . I also checked Firefox and was working.

No error in Console, I am on Mac

There are some verbose errors, not sure its related, I am attaching a screenshot

Pinging @Cedric to test on Chrome Mac

No luck for me. tested on Chrome mac with the exact same version and it works

I am adding a video below of this behaviour
on the right side is safari working, on left chrome just move object up/down instead going forward.

I included a snippet to track events:

document.addEventListener('pointerdown', () => {
document.addEventListener('pointerup', () => {

to be sure, when you press the up key to move forward while the left mouse button is down, then the camera doesn’t move ?
I did another try and it works for me. Can you try to add a key event listener ?

I am not pressing any keyboard button, I left click mouse and move forward while the left mouse button is down, no keyboard button is pressed before or after.

when moving mouse with left button down the camera will rotate, not move. What am I missing?

I have uploaded a video of this issue on youtube,

on left it shows chrome and on right safari, you could see in console inside video, I am clicking left of mouse and dragging but it is different behaviour on each browser.

alright, then the issue is with Safari not Chrome.

but for me I want Safari behaviour to happen on left mouse and drag forward, this way I can easily walk around the scene, only rotation will become issue in universal camera.

ps. it also rotates when I am dragging mouse up/down and forward on safari, which is good.

I can repro the issue and will fix it with Safari. Until a fix is release, you can add:

camera.touchMoveSensibility = 0;

for a workaround.
To move the camera with the mouse, you’ll have to add a mousemove event and change the position when the mouse button is down.


Thank @Cedric, I will try that with my limited knowledge I gained in last two weeks, I have learned a lot these days, so many resources here, Now I was learning about Cameras and encountered this.

1 Like

PR is live: Check Event Type Touch input Camera by CedricGuillemet · Pull Request #8707 · BabylonJS/Babylon.js · GitHub