Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 7ca8113

Browse files
Fix shadow and camera (#9493)
Co-authored-by: HexaField <[email protected]>
1 parent 8b77813 commit 7ca8113

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/engine/src/camera/systems/CameraInputSystem.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import { XRState } from '../../xr/XRState'
5050

5151
import { InputState } from '../../input/state/InputState'
5252

53+
import { isMobile } from '../../common/functions/isMobile'
5354
import { InputSystemGroup } from '../../ecs/functions/EngineFunctions'
5455
import { CameraSettings } from '../CameraState'
5556
import { FollowCameraComponent } from '../components/FollowCameraComponent'
@@ -214,7 +215,9 @@ const execute = () => {
214215
if (keys?.KeyC?.down) onKeyC()
215216

216217
const pointerState = getState(InputState).pointerState
217-
const mouseMoved = keys?.PrimaryClick?.pressed
218+
const mouseMoved = isMobile
219+
? pointerState.movement.lengthSq() > 0 && keys?.PrimaryClick?.pressed
220+
: keys?.PrimaryClick?.pressed
218221

219222
for (const entity of avatarControllerEntities) {
220223
if (!inputSource) continue

0 commit comments

Comments
 (0)