Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shadow and camera #9493

Merged
merged 2 commits into from
Dec 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/engine/src/camera/systems/CameraInputSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { XRState } from '../../xr/XRState'

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

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

const pointerState = getState(InputState).pointerState
const mouseMoved = keys?.PrimaryClick?.pressed
const mouseMoved = isMobile
? pointerState.movement.lengthSq() > 0 && keys?.PrimaryClick?.pressed
: keys?.PrimaryClick?.pressed

for (const entity of avatarControllerEntities) {
if (!inputSource) continue
Expand Down