A BepInEx mod for Nuclear Option that fixes the HUD arrow pointing at an off-screen target.
In the unmodded game the arrow is right as long as the target is in front of you. Once the target is more than 90° away from where you look, the arrow often sits on the wrong side of the screen. Flying north-west with a target to the south, for example, the target is 135° to your left, yet the arrow shows up on the right edge. Following it means a 225° turn instead of 135°.
With the mod the arrow always sits on the side you need to turn to. When a target is almost exactly behind you, the arrow stays at the side of the shorter turn and does not flicker between left and right. Airbase markers pinned to the screen edge had the same bug and are fixed too.
The mod only changes where the HUD draws the arrow. It does not touch flight, weapons or networking, and other players need nothing installed.
With NOMM (Nuclear Option Mod Manager): search for NO-TargetArrowFix and install it.
By hand: install BepInEx 5 (x64), then unpack NO-TargetArrowFix-<version>.zip from the releases into Nuclear Option/BepInEx/plugins/NO-TargetArrowFix/. On Linux with Proton, BepInEx needs WINEDLLOVERRIDES="winhttp=n,b" %command% in the game's Steam launch options.
BepInEx/config/xyz.geraldhofbauer.notargetarrowfix.cfg, or in game through BepInEx.ConfigurationManager (F1):
| Setting | Default | |
|---|---|---|
Enabled |
true |
Off brings back the game's own arrow, handy for comparing |
AsternConeDegrees |
10 |
Within this angle of straight behind you, the arrow sits at the side of the shorter turn |
HysteresisDegrees |
3 |
How far past straight behind a target has to move before the arrow switches sides |
HUDFunctions.PinToScreenEdge takes the arrow direction from Camera.WorldToScreenPoint. For a point behind the camera, Unity returns that point mirrored through the screen centre with a negative depth. The game drops the depth and treats x and y as if the target were ahead, so the arrow ends up on the opposite side.
The mod replaces that function with a Harmony prefix. The direction comes from the target's position in camera space: for targets ahead it is the same perspective projection the game uses, and for targets behind it is that projection without the division by depth. The arrow therefore moves smoothly across the 90° line. The math lives in src/EdgePin.cs without any Unity types and is covered by the tests in tests/, including the north-west example above.
The game's assembly is not part of this repository. scripts/make-refs.sh makes reference-only copies (signatures, no code) from your own install into lib/refs/.
scripts/make-refs.sh # once, and after game updates; GAME=/path/to/Nuclear Option if not the default
scripts/build.sh # builds in a .NET 8 SDK container, runs the tests, writes dist/NO-TargetArrowFix-<version>.zip
scripts/install-local.sh # installs that zip like NOMM would (with meta.json)MIT, see LICENSE.