Skip to content

Cloverpit: canvas pointer lock so look doesn't stop at screen edge - #45

Merged
GLAXYIAS merged 1 commit into
mainfrom
feature/cloverpit-canvas-pointer-lock
Aug 14, 2026
Merged

Cloverpit: canvas pointer lock so look doesn't stop at screen edge#45
GLAXYIAS merged 1 commit into
mainfrom
feature/cloverpit-canvas-pointer-lock

Conversation

@Galethis

Copy link
Copy Markdown
Collaborator

Problem

Pointer lock was working (cursor hides) but look still stopped at the screen edge.

That happens when lock is not on the Unity #unity-canvas itself — the browser/game still uses absolute mouse coords that clamp at the edge.

Fix

Surgical add to Games/cloverpit/index.html only:

  • On first click / pointerdown, call requestPointerLock() on #unity-canvas
  • Prefer { unadjustedMovement: true } (raw deltas) with normal fallback
  • Re-lock on later clicks if lock was lost
  • No button / overlay

Test

  1. Merge & hard-refresh
  2. Launch Cloverpit
  3. Click the game once
  4. Move mouse continuously in one direction — camera should keep turning with no edge stop

Esc still exits pointer lock (browser default).

@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

@GLAXYIAS
GLAXYIAS merged commit 4323903 into main Aug 14, 2026
1 check passed
@GLAXYIAS
GLAXYIAS deleted the feature/cloverpit-canvas-pointer-lock branch August 14, 2026 00:03
github-actions Bot pushed a commit that referenced this pull request Aug 14, 2026
…-lock

Cloverpit: canvas pointer lock so look doesn't stop at screen edge
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