How furpz/tt_camerafpsunlocker works
1. Repository type
- This is a single-game mod written in C# and built as a class-library assembly (CameraFPSUnlocker.csproj / TT_CameraFPSUnlocker.slnx).
- There is no standalone app or service here; the code is meant to be loaded into the game at runtime.
2. Primary goal
- The mod’s purpose is to make the camera feel smooth at 60 Hz+ by aligning camera behavior with the game’s actual render/update rate instead of being constrained by fixed physics timing.
- The README also calls out a second effect: preventing projectile/self-collision issues introduced by interpolation.
3. Main runtime boundary
- The important architectural boundary is game engine vs. mod patches.
- The game owns the simulation loop and physics; this mod injects behavior into existing game methods rather than replacing the game architecture.
4. Bootstrap / entry layer
- CameraFPSUnlockerMod.cs and KickStart.cs are the likely initialization layer.
- This is where the mod is probably registered, Harmony patching is started, and any runtime setup is performed before gameplay logic is altered.
5. Configuration
- ModSettings.cs is the settings boundary.
- Any user-facing toggles or tuning values would live here, separating mod behavior from patch logic so the patch code stays focused on interception and behavior changes.
6. Camera subsystem
- Patches/CameraPatches.cs is the core camera-related modification point.
- Per the README, the mod effectively moves camera logic from FixedUpdate to Update, which changes the timing model from physics-driven to frame-driven and is the main reason the camera appears smoother.
7. Physics / interpolation subsystem
- The mod also enables rigidbody interpolation on the tech/player vehicle entity.
- This is a rendering-smoothing layer on top of the physics system, helping the camera and vehicle motion look continuous between fixed physics steps.
8. Firing / projectile compensation
- Patches/FiringPatch.cs handles a side effect of interpolation: moving or shooting can cause projectiles to collide with the player’s own tech.
- The patch offsets projectile origins by one physics frame ahead of the tech, compensating for the interpolated render position versus the actual physics position.
9. Data flow
- Game loop events (Update / FixedUpdate) and firing logic flow into Harmony patches.
- Those patches alter camera timing, interpolation settings, and projectile spawn position, then hand control back to the original game systems.
10. Technology footprint
- The mod is a Harmony-based C# Unity game mod.
- The architecture is lightweight: no database, no network service, no asset pipeline, and no persistence layer beyond whatever the game/mod loader provides.
11. What to diagram
- For an architecture diagram, show:
- the game engine as the host,
- a mod bootstrap layer,
- camera timing patching,
- physics interpolation, and
- projectile origin compensation as a separate corrective path.
- The key idea is that the mod modifies runtime behavior at method boundaries, not by adding new standalone subsystems.
Main entry points: CameraPatches.cs Camera patch · FiringPatch.cs Firing patch · CameraFPSUnlockerMod.cs Mod entry · ModSettings.cs Settings
Components 15
Game Host
The Unity game that loads and runs the mod at runtime.
- Game engine · The base game runtime that owns simulation, rendering, and method boundaries.
- Game systems · The game's original camera, physics, and firing logic that the mod patches in place.
Bootstrap
Mod entry and initialization layer.
Camera
Camera timing and smoothing behavior.
- Camera patch · Moves camera behavior toward frame-driven updates to feel smooth at higher refresh rates.
Patches/CameraPatches.cs - Update loop · Per-frame game update boundary used by the camera patch.
- Smooth motion · The perceived continuous camera and vehicle motion shown to the player.
Physics
Render-smoothing around the game's fixed physics.
- FixedUpdate · Physics-timed update boundary the mod works around.
- Interpolation · Enables rigidbody interpolation to smooth visible motion between physics steps.
- Tech entity · The player vehicle or rigidbody that receives interpolation changes.
Firing
Projectile spawn correction path.
- Firing patch · Offsets projectile origin to compensate for interpolation-induced self-collision.
Patches/FiringPatch.cs - Projectile spawn · Projectile creation point adjusted forward by one physics frame.
- Projectile hit · Projectile collision behavior corrected so shots do not strike the moving tech immediately.
Config
User-facing mod settings boundary.
- Settings · Central settings boundary for toggles and tuning values.
ModSettings.cs
Connections 19
- Game engine → Mod entry: loads · The host loads the mod assembly and starts initialization.
- Mod entry → KickStart: starts · Entry code hands off startup work to the kickstart layer.
- Mod entry → Harmony: installs · Initialization enables Harmony patch application.
- KickStart → Settings: reads · Startup code consumes mod settings before applying behavior changes.
- Harmony → Camera patch: patches · Harmony intercepts camera-related game methods.
- Harmony → Firing patch: patches · Harmony intercepts projectile firing logic.
- Game systems → Update loop: runs · The game drives per-frame updates.
- Game systems → FixedUpdate: runs · The game also drives fixed-timestep physics updates.
- Update loop → Camera patch: routes · Camera behavior is shifted toward frame-driven timing.
- FixedUpdate → Interpolation: feeds · Interpolation bridges the fixed physics cadence to render-time motion.
- Tech entity → Interpolation: applies · The vehicle rigidbody is configured for interpolation.
- Interpolation → Smooth motion: smooths · Interpolation makes visible movement continuous between physics steps.
- Camera patch → Smooth motion: improves · The camera feels smoother at 60 Hz+ by following the frame update cadence.
- Game systems → Firing patch: emits · Original firing logic is redirected through the projectile compensation patch.
- Firing patch → Projectile spawn: offsets · The projectile origin is moved ahead to match the interpolated tech position.
- Projectile spawn → Projectile hit: prevents · The offset reduces self-collision and other interpolation-related shot issues.
- Settings → Camera patch: configures · Settings can tune how the camera patch behaves.
- Settings → Firing patch: configures · Settings can tune projectile compensation behavior.
- Game systems → Tech entity: contains · The original game owns the vehicle rigidbody that the mod enhances.