client(camera): smooth fixed-camera world-space follow and eliminate jitter#10
Open
RZDESIGN wants to merge 4 commits intohytopiagg:mainfrom
Open
client(camera): smooth fixed-camera world-space follow and eliminate jitter#10RZDESIGN wants to merge 4 commits intohytopiagg:mainfrom
RZDESIGN wants to merge 4 commits intohytopiagg:mainfrom
Conversation
added 4 commits
March 3, 2026 13:36
Made-with: Cursor
- Introduced new collision detection logic in the Camera class to improve camera behavior during gameplay. - Added methods for sampling game camera collision distance and determining when to sample based on movement and direction. - Updated EntityManager to include vertical velocity estimation and refined movement direction tracking for better local prediction accuracy. - Adjusted local prediction parameters for horizontal and vertical movement to enhance responsiveness and stability.
- Added new properties to LocalPredictionState for pre-acknowledgment reconciliation and acknowledgment support detection. - Updated initialization and reset logic to incorporate new state properties. - Improved command buffering behavior based on acknowledgment support and pre-acknowledgment grace period. - Refined reconciliation logic to handle pending commands and ensure smoother movement transitions.
- Introduced new properties for managing attached and tracked camera positions, including targets for smoother transitions. - Implemented logic to snap positions on large jumps and lerp for gradual adjustments. - Updated deserialization handling to ensure mutual exclusivity between tracked entity and position. - Improved camera shoulder rotation handling with a dedicated axis vector.
Review (camera smoothing)Nice improvement for fixed-camera world-space follow. Smoothing the packet-driven attached/tracked positions and adding snap-on-teleport should eliminate the small jitter you can get when those positions arrive quantized / irregularly. What looks good
Things to double-check (possible behavior changes)
Perf / mobile vs desktop
|
Author
|
Thanks for the review — agreed on splitting and validating behavior details. I split this into smaller reviewable units while preserving current functionality:
On the review points:
Appreciate the detailed notes — they helped tighten the split and rollout plan. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves fixed-camera feel by smoothing world-space camera attachment/target updates on the client and removing micro-jitter sources in camera orientation/projection updates.
Problem
With fixed cameras driven via
setAttachedToPosition(...)+setTargetPosition(...), camera packets can arrive in visible steps.Result: player appears stable, but the world/map can “shake” or “swim”.
Changes
attachedToPositionupdates.trackedPositionupdates.filmOffset,fov,zoom).Result