Skip to content

Camera: smoother turned view, stage collision, wall fade only for what really blocks - #71

Merged
schindlershadow merged 1 commit into
mainfrom
camera-polish
Nov 16, 2026
Merged

schindlershadow merged 1 commit into
mainfrom
camera-polish

Conversation

@schindlershadow

Copy link
Copy Markdown
Owner

The right-stick camera felt jumpy and its distance pumped in and out, and the wall fade made unrelated walls see-through.

Camera (games/dissidia/runtime/camera.cpp)

  • Orbits the player's own fighter. Before, it orbited whichever fighter was nearest the lens, so it could swing over to the opponent.
  • The orbit point follows the fighter with a short lag. Before, every step, landing and dash jolted the turned view, more so the further it was turned.
  • The orbit distance eases after the game's distance. The game zooms and pulls in for its own view direction, which made the turned view pump in and out.
  • The right stick drives a turn speed that eases in and out, with a response curve. Re-centring ramps in instead of starting at full speed. The held view (no lock-on) follows jumps with a lag. The relock ease is now timed, not counted in updates.
  • New: the turned or held view collides with the stage (ge_draw_camera_probe_*). The renderer keeps the main view's static stage geometry in world space and traces the line from the fighter's chest to the eye, one frame late. The eye pulls in fast and lets out slowly, so it no longer ends up outside the room looking at the back of a wall (Pandaemonium).

Wall fade (runtime/src/psp_ge_draw.cpp)

  • Fade state is kept per drawn copy (vertex data + world position). Before, one blocking pillar faded every copy of that mesh.
  • Fading is timed per frame, not per draw call. Walls fade back in after the turned view ends instead of popping back.
  • The rays start 0.35 m behind the eye instead of 2 m. There is no feet ray, and nothing lower than the knees fades (floors, kerbs).
  • Default opacity is 0.25 (PSPRECOMP_CAM_BLOCKER_ALPHA).

New env options for tuning or turning the smoothing and collision off are listed in docs/native-build.md. Test aids: the test script command rstick <x> <y> and PSPRECOMP_CAMF_LOG=<n>.

Tests
Headless, old vs new build with the same scripted input:

  • Stage 12, view turned: the 99th-percentile eye acceleration dropped from 253 to 123 m/s².
  • Stage 3 (Pandaemonium): the turned view stays in the room with the fighter visible; the old build lost him behind walls.
  • Open stage 12: no false pull-ins.

Tested in real play on Android by the user.

Release notes

  • The right-stick camera turns and settles smoothly and no longer jumps when the opponent comes close or when your fighter steps, lands or dashes.
  • The turned camera no longer goes through walls; it moves in closer instead of ending up behind them.
  • Only walls and pillars that actually block your fighter turn see-through, and they fade in and out smoothly.

🤖 Generated with Claude Code

… only for what really blocks

Camera (camera.cpp):
- orbit the player's own fighter (the nearest fighter to the lens could switch to the opponent and throw the view)
- pivot follows the fighter with a short lag; orbit radius eases after the game's distance (the game zooms and
  pulls in for its own view direction), faded out as the offset returns to zero
- stick drives an eased turn speed with a response curve; re-centring ramps in; held rig follows jumps with a lag;
  relock ease is time-based (was per update)
- turned / held view collides with the stage (ge_draw_camera_probe_*): fast pull-in, slow let-out

Wall fade (psp_ge_draw.cpp):
- fade state per drawn instance (vertex data + world position): one hit pillar no longer fades every copy
- time-based easing per frame (not per draw call), fades back in after the custom view ends instead of popping
- rays start 0.35 m behind the eye (was 2 m), no feet ray, nothing lower than the knees fades (floors, kerbs)
- alpha 0.25 (PSPRECOMP_CAM_BLOCKER_ALPHA)

Test aids: script command `rstick <x> <y>`, PSPRECOMP_CAMF_LOG=<n>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schindlershadow
schindlershadow merged commit 3becbc8 into main Nov 16, 2026
2 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.

1 participant