ThirdPersonMod
Third-person camera: B key switches first/third person, PUBG-style shoulder-back offset perspective, crosshair and pickup are strictly consistent, and the configuration file is adjustable
About this mod Machine translation
Old Market Simulator · Third Person Camera Mod (ThirdPersonMod)
A third-person perspective Mod made for "Old Market Simulator", a PUBG-style over-the-shoulder perspective, and the B key can switch back to the first-person perspective at any time.
Features
- B key switches between first person/third person, and there is no jump in the perspective when switching.
- Offset viewing angle: the character is located at the bottom right of the screen, adjustable
- Zero parallax of the crosshair: the rays used for picking up and interacting in the third person view are strictly consistent with the crosshair (convergent aiming)
- Automatic eye height calibration: based on the first-person camera position, adapted to different character models
- Character body display: local players are hidden by the game by default (ShadowsOnly only projects but does not render), and automatically restores display in third-person mode
- Camera anti-wall penetration: automatically zooms in when your back is against a wall
- BepInEx configuration file parameter adjustment, changing values without recompiling
Prerequisites
- BepInEx 5.4.x (already installed, just have the BepInEx folder in the game root directory)
Install
- Download ThirdPersonMod.dll from Releases
- Place it in the BepInEx\plugins\ folder of the game directory
- Start the game and press B to switch to third person
Configuration
After running for the first time, BepInEx\config\camera.patcher.mod.cfg is generated. After saving the changes, enter the game and press B to take effect:
| Configuration items | Default value | Description |
|---|---|---|
| Mouse sensitivity | 0.12 | Turn speed per pixel |
| Camera distance | 2.2 | Distance between camera and character (meters) |
| Horizontal offset | -0.35 | The more negative the character is, the closer to the right side of the screen (PUBG is about -0.4 ~ -0.5) |
| Vertical offset | 0.18 | The larger the character, the closer it is to the bottom of the screen |
| Convergence distance | 40 | Crosshair convergence distance, generally does not need to be changed |
| Ray correction | 0.3 | Fine-tuning of near pickup feel |
Compile yourself
- Install .NET SDK (supports net472)
- Copy the following DLLs from the game Old Market Simulator_Data\Managed\ and BepInEx\core\ to libs/:
BepInEx.dll
0Harmony.dll
Assembly-CSharp.dll
UnityEngine.dll
UnityEngine.CoreModule.dll
UnityEngine.InputLegacyModule.dll
UnityEngine.PhysicsModule.dll
UnityEngine.AnimationModule.dll
Unity.InputSystem.dll
- dotnet build, the product is in bin\Debug\net472\
The DLL in libs/ is a game copyright file, please do not upload/distribute it.
Implementation principles (for learning)
- Harmony patch ExampleCharacterCamera.UpdateWithInput(KinematicCharacterController), overwrites the camera pose after the original camera logic is executed
- PlayerInteraction.InteractionRay temporarily aligns the camera with the "converging line of sight" at the moment of execution to make the pickup ray consistent with the crosshair, and restores it after completion.
- RenderPipelineManager.beginCameraRendering returns the ShadowCastingMode of the local player renderer from ShadowsOnly to On at the time of RenderPipelineManager.beginCameraRendering
Disclaimer
This Mod has nothing to do with the game developers and is only for learning and communication. The game may become invalid after updating, please submit an issue in that case.
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: