Skip to content

fix: framerate-independent global scale speed#33

Merged
manaporkun merged 1 commit into
mainfrom
fix/scaleglobal-framerate
Jun 1, 2026
Merged

fix: framerate-independent global scale speed#33
manaporkun merged 1 commit into
mainfrom
fix/scaleglobal-framerate

Conversation

@manaporkun
Copy link
Copy Markdown
Owner

@manaporkun manaporkun commented Jun 1, 2026

From #26 (P2). ScaleGlobal.Interact multiplied the per-frame mouse pixel delta by Time.deltaTime, so uniform-scale speed depended on the frame rate (higher fps → smaller dt → slower scaling for the same drag).

Fix: drop Time.deltaTime so the scale delta depends only on drag distance. MouseSensitivity retuned 2f → 0.0333f to preserve the previous feel at 60 fps (old effective rate was 2 * (1/60) ≈ 0.0333 per pixel).

⚠️ Constant is feel-matched to 60 fps but not play-tested here — quick manual check of the global (center cube) scale drag recommended; the behavior is now correct (framerate-independent) regardless of the exact constant.

fix: → patches to 3.0.3 on merge.


Note

Low Risk
Small interaction tweak in one scale handle; feel is constant-matched to 60 fps but worth a quick manual drag check.

Overview
Fixes framerate-dependent uniform scaling on the global (center cube) scale handle in ScaleGlobal.Interact.

The drag delta was incorrectly multiplied by Time.deltaTime on top of per-frame mouse pixel movement, so higher FPS made scaling slower for the same drag. Time.deltaTime is removed so scale change tracks drag distance only. MouseSensitivity is retuned from 2f to 0.0333f to approximate the old feel at 60 fps (2 * deltaTime per pixel).

Reviewed by Cursor Bugbot for commit dabf758. Bugbot is set up for automated code reviews on this repo. Configure here.

ScaleGlobal.Interact multiplied the per-frame mouse pixel delta by
Time.deltaTime, tying uniform-scale speed to the frame rate (higher fps ->
smaller dt -> slower scaling for the same drag). Drop Time.deltaTime so the
scale delta depends only on drag distance; MouseSensitivity is retuned to
0.0333 to preserve the previous feel at 60 fps.
@manaporkun manaporkun merged commit 8477984 into main Jun 1, 2026
6 checks passed
@manaporkun manaporkun deleted the fix/scaleglobal-framerate branch June 1, 2026 23:19
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.

1 participant