Skip to content

fix: update InputManager with camera when renderer initializes#1235

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-selection-VWYLy
Feb 2, 2026
Merged

fix: update InputManager with camera when renderer initializes#1235
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-selection-VWYLy

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

The camera is created asynchronously in useWebGPURenderer after the game is initialized. The InputManager.updateDependencies call in useGameInput ran before the camera existed, so input handlers couldn't convert screen coordinates to world coordinates.

Now we explicitly update InputManager with the camera when it's created in useWebGPURenderer, ensuring right-click commands can properly calculate world positions.

https://claude.ai/code/session_01VWGwpnz8yMDkYjicbv2dZ7

The camera is created asynchronously in useWebGPURenderer after the
game is initialized. The InputManager.updateDependencies call in
useGameInput ran before the camera existed, so input handlers couldn't
convert screen coordinates to world coordinates.

Now we explicitly update InputManager with the camera when it's created
in useWebGPURenderer, ensuring right-click commands can properly
calculate world positions.

https://claude.ai/code/session_01VWGwpnz8yMDkYjicbv2dZ7
@braedonsaunders braedonsaunders merged commit c6c15df into main Feb 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants