diff --git a/packages/frontend/src/pages/room.vue b/packages/frontend/src/pages/room.vue index d60724381e..163b10ac74 100644 --- a/packages/frontend/src/pages/room.vue +++ b/packages/frontend/src/pages/room.vue @@ -219,6 +219,7 @@ const resolutionAutoValue = computed(() => deviceKind !== 'desktop' ? 0. const resolution = computed(() => resolutionRaw.value ?? resolutionAutoValue.value); const useVirtualJoystick = isTouchUsing && (deviceKind === 'smartphone' || deviceKind === 'tablet'); +//const useVirtualJoystick = true; const wasdVec = { x: 0, y: 0 }; const pointerVec = { x: 0, y: 0 }; @@ -426,10 +427,11 @@ onMounted(async () => { timeoutId = window.setTimeout(() => { timeoutId = null; - pointerVec.x = 0; - pointerVec.y = 0; - controller.setCameraRotateVector(pointerVec); + controller.setCameraRotateVector({ + x: 0, + y: 0, + }); }, 10); }; diff --git a/packages/frontend/src/world/room/engine.ts b/packages/frontend/src/world/room/engine.ts index c470e1aab7..91dcd14d0c 100644 --- a/packages/frontend/src/world/room/engine.ts +++ b/packages/frontend/src/world/room/engine.ts @@ -308,13 +308,11 @@ export class RoomEngine extends EventEmitter { this.camera.inertia = 0.75; } else { this.camera.inputs.add(new FreeCameraManualInput({ - moveSensitivity: 0.001 * WORLD_SCALE, - rotationSensitivity: 0.01, + moveSensitivity: 0.002 * WORLD_SCALE, + rotationSensitivity: 0.0003, })); } - this.camera.attachControl(this.canvas); - //this.scene.activeCamera = this.camera; this.roomLight = new BABYLON.SpotLight('roomLight', new BABYLON.Vector3(0, cm(249), 0), new BABYLON.Vector3(0, -1, 0), 16, 8, this.scene); @@ -606,7 +604,7 @@ export class RoomEngine extends EventEmitter { } public cameraMove(vector: { x: number; y: number; }, dash: boolean) { - (this.camera.inputs.attached.manual as FreeCameraManualInput).setMoveVector(dash ? { x: vector.x * 4, y: vector.y * 4 } : vector); + (this.camera.inputs.attached.manual as FreeCameraManualInput).setMoveVector(dash ? { x: vector.x * 3, y: vector.y * 3 } : vector); } public cameraRotate(vector: { x: number; y: number; }) { diff --git a/packages/frontend/src/world/utility.ts b/packages/frontend/src/world/utility.ts index b705e664e3..2990168f0f 100644 --- a/packages/frontend/src/world/utility.ts +++ b/packages/frontend/src/world/utility.ts @@ -653,7 +653,7 @@ export class FreeCameraVirtualJoystickInput implements BABYLON.ICameraInput