# BeamNG

## Connection Method

**UDP** — BeamNG.drive sends telemetry data over UDP to DR Sim Manager. You need to enable this in the game's settings.

* **Default IP**: `127.0.0.1`
* **Default Port**: `4444`
* **Default Update Rate**: 100 Hz

## Setup Steps

1. Launch **BeamNG.drive**.
2. Navigate to the **Options** menu and select the **OTHER** tab.
3. In the **MotionSim** section, configure the following settings:
   * **MotionSim enabled**: Make sure this is checked (`[x]`).
   * **IP**: Set to `127.0.0.1`
   * **Port**: Set to `4444`
   * **Update rate**: Set to `100`
4. Apply the settings.
5. In DR Sim Manager, select **BeamNG.drive** from the Source list and click **Start Motion**.

## Available Telemetry

BeamNG provides solid telemetry data for its soft-body physics:

* **Orientation**: Pitch, Roll, Yaw (in radians)
* **Acceleration**: Full 3-axis acceleration
* **Angular Velocity**: Full 3-axis rotation rates
* **Speed**: Calculated from velocity vector magnitude
* **Position**: World-space position
* **Velocity**: World-space velocity vector

### Data Not Available

BeamNG's telemetry packet does not include:

* Engine RPM
* Gear position
* Suspension data (individual wheel data)
* Vehicle name

### Telemetry Quality: ★★★★☆

BeamNG provides good core motion data. The lack of RPM and suspension data means some cues (like Engine Haptics and detailed Ground Cue) have limited functionality.

## Recommended Starting Settings

BeamNG's soft-body physics can produce very dynamic motion, especially during crashes:

* **Primary Cue Gain**: 50–80% (start lower to test crash behaviour)
* **Smoothing**: Medium
* **Washout**: Medium to high
* **Safety Limits**: Consider enabling safety limits, as BeamNG crashes can produce very sudden, large forces

## Known Quirks

* **Stale data detection**: DR Sim Manager detects when the angular velocity value hasn't changed between packets and skips duplicate data to avoid processing stale information.
* **Crash physics**: BeamNG's soft-body deformation can create extreme telemetry spikes during crashes. The Safety Limits cue can help protect your platform.
* **No RPM data**: Engine sound-based cues (Engine Haptics, Bass Shaker) will not respond to engine RPM in BeamNG.
* **Update rate**: Setting the update rate higher than 100 Hz may not improve motion quality and can increase CPU usage.

## Troubleshooting

### No telemetry data

1. Verify **MotionSim enabled** is checked in BeamNG's Options > OTHER tab.
2. Confirm the **IP** is set to `127.0.0.1` and **Port** is `4444`.
3. Make sure you are actively driving a vehicle (not in the menu or vehicle selector).
4. Check your Windows Firewall — BeamNG may need permission to send UDP data. Allow `BeamNG.drive.exe` through the firewall.
5. Restart both BeamNG and DR Sim Manager.

### Socket timeout errors

* This appears in DR Sim Manager's log when no data is received for 1 second. It usually means BeamNG is not sending data — verify the MotionSim settings.
* If you have a VPN or unusual network configuration, ensure `127.0.0.1` is routed correctly (loopback should always work).

### Motion feels too violent during crashes

* Reduce the Primary Cue gain.
* Enable the **Safety Limits** cue to automatically dampen extreme forces.
* Consider the **Crash** cue settings to control crash-related motion.
