Navigation
Browse the developer docs

FH2 Mod Platform for .NET

Camera

The game's camera: shake it.

By Bartholomew Ho (qiangqiang101) · MIT license · v0.12.0 · 15 Nov 2026 · repository · original page

On this page

The game's camera. Right now you can use it to shake the camera.

Thread: any.

Example

Shake the camera while you go faster than 300 km/h.

protected override void OnInit()
{
    Game.Tick += () =>
    {
        var fast = Player.Car is { } car && car.SpeedKmh > 300;
        Camera.Shake = fast ? 1f : 0f;
    };
}
Protected Overrides Sub OnInit()
    AddHandler Game.Tick, Sub()
                              Dim car = Player.Car
                              Dim fast = car IsNot Nothing AndAlso car.SpeedKmh > 300
                              Camera.Shake = If(fast, 1.0F, 0.0F)
                          End Sub
End Sub

Members

MemberWhat it does
Shake (property, float, get/set)How hard the camera shakes. 0 is still, 1 is a good rumble (peaks at about half a degree), more for more. ⚠️ Not tested much in the game yet.
IsReady (property, bool)True if the camera can be shaken (the game's code is as expected).
Kind (property, CameraKind, get)Which camera is showing the game: Chase, ChaseNear, ChaseFar, Driver, Hood, Bumper, Free, Animated, Replay, or Unknown (a menu, a cutscene). Game thread only. New in 0.12.0.
Position (property, Vector3?, get)Where the camera is, in world coordinates; null if it isn't known. Game thread only. New in 0.12.0.
Forward (property, Vector3?, get)Which way the driving camera looks, from the last frame drawn with one. Any thread. New in 0.12.0.
FovScale (property, float, get/set)The driving cameras' field of view as a multiple of the game's: 1.1 is 10% wider. 0.3 to 3. New in 0.12.0.
ViewUpdated (event, Action<CameraView>)Each time a driving camera works out its view, on the thread the game draws from: change the CameraView (Right, Up, Forward, Translation) to move or turn the camera. Keep it short. New in 0.12.0.
Group (property, int, get/set)The director's camera mode, as the game numbers it (13 is the replay's cameras); -1 if it isn't known. Setting it switches, as the camera button does. Game thread only. New in 0.12.0.
ShowReplayShot(byte label) → boolSwitches to the replay's shot label around the car (17 and 19 are slow orbits), as ANNA's cinematic camera does. New in 0.12.0.
Flash() → boolThe game's white flash between cameras. False while one is on. New in 0.12.0.

Notes

  • The shake works in the driver, hood, bumper and chase views. Other views don't shake.
  • The shake fades in (about 0.2 seconds) and back out (about 0.4 seconds) by itself. Just set a value, then set it back to 0.
  • Shake is kept between 0 and 10. A value that isn't a real number (like NaN) becomes 0.
  • Setting Shake throws InvalidOperationException if the game isn't ready yet (still loading, or an unsupported game build). Setting it from Game.Tick is safe.
  • If your mod is reloaded, the shake stops.
  • On a game build the SDK doesn't support, the shake switches itself off: IsReady stays false and platform.log says so. If only some cameras could be set up, the log says it may work in some views only.

See also

Copied from the wiki page Camera at commit 7396a07 · MIT license
MIT License

Copyright (c) 2026 Bartholomew Ho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.