Overview
TrackForge is a set of C++ components built around a physics pawn whose code runs on every physics step. The ready-to-drive TrackForge Tracked Vehicle combines them; each part can also be used on its own in your own Blueprint vehicles.
- Ready-to-drive tracked vehicle with a physics chassis, two tracks of five road-wheels each and throttle / steering input with differential steering.
- Engine with a torque curve (your Curve Float or the built-in curve), idle and rev limiter, engine braking and an RPM output.
- Gearbox in automatic or manual mode with any number of forward gears, reverse, final drive, efficiency and shift time.
- Service brakes and parking brakes per track.
- Neutral steer: the tracks counter-rotate to pivot on the spot when the vehicle is stationary.
- Surface friction data asset: friction scale and rolling resistance per physical surface.
- Track tension: the upper run of the track sags when the tension is lowered.
- Track speed per side and automatic material UV scrolling on given material instances.
- Road-wheel sync: wheel meshes spin with the track and follow the suspension.
- Telemetry: speed, RPM, torque, gear, track speeds, slip and grounded wheels in one struct.
- Anti-roll stabiliser between left and right suspension.
- Cruise control and speed limiter driven by the PID controller.
- Turret / aim rig with yaw and pitch speeds and angle limits, aiming at a target, by input or by angles.
- Server-authoritative networking: input is sent to the server, the server runs the physics and the movement replicates.
- TrackForge.Debug console variable drawing suspension rays, contact and friction forces and telemetry text.
- Building blocks: physics sub-step pawn, suspension stacks (ray, sphere or shape sweep), friction component with friction ellipse, PID controller, track animation along a spline and sub-stepping-safe Blueprint nodes.
Requirements
| Requirement | Details |
|---|---|
| Unreal Engine | 4.27 and 5.8 |
| Modules | TrackForge (Runtime) |
| Dependencies | None (engine modules only; no other plugins are enabled) |
| Physics | PhysX on UE 4.27, Chaos on UE 5.8. The vehicle's root component simulates physics. |
| Platforms | Win64 and Mac (the module lists these platforms in the plugin descriptor). The code is platform-independent engine C++ with no OS-specific calls. |
| Network Replicated | Yes. Driver input, drive train state and turret angles replicate; the server runs the authoritative physics. |
| Content | None. TrackForge is C++ only; use your own meshes. |
Installation
- Install TrackForge from Fab into your engine, or copy the
TrackForgefolder into your project'sPluginsfolder. - Enable TrackForge in Edit > Plugins and restart the editor.
- C++ only: add
PublicDependencyModuleNames.Add("TrackForge");to yourBuild.cs.
Quick start
- Create a Blueprint class from TrackForge Tracked Vehicle (
ATrackForgeVehiclePawn). - Assign your hull mesh to ChassisMesh and resize the Chassis box (default extent 300 x 150 x 60 cm, mass 20000 kg) to cover the hull.
- In the Event Graph, call Set Throttle Input and Set Steering Input from your input events (W/S and A/D, a gamepad stick or Enhanced Input actions). Alternatively set Throttle Axis Name and Steering Axis Name to legacy axis mappings.
- Place the vehicle above the ground, set Auto Possess Player to Player 0 and press Play. Type
TrackForge.Debug 1in the console to see the suspension and telemetry. - Optional: add a TrackForge Track Animation per side for treads, a TrackForge Wheel Sync for road-wheel meshes and a TrackForge Turret for the turret.
Tracked vehicle
Pawn ATrackForgeVehiclePawn — displayed as TrackForge Tracked Vehicle; derives from the TrackForge Physics Pawn.
| Component | Class | Default |
|---|---|---|
| Chassis (root) | Box Component | Extent 300 x 150 x 60 cm, collision profile Vehicle, simulates physics, mass override 20000 kg, center of mass nudged 40 cm down |
| ChassisMesh | Static Mesh Component | No mesh, no collision |
| LeftTrack / RightTrack | TrackForge Track | At (0, -130, -40) / (0, 130, -40), five road-wheels at X = 200, 100, 0, -100, -200 |
| SpeedController | TrackForge PID Controller | 30 errors, P 0.25, I 0.5, D 0 |
| Property | Default | Description |
|---|---|---|
| Engine Settings | see Engine | Torque curve, RPM range, engine braking. |
| Gearbox Settings | see Gearbox | Mode, ratios, shift time. |
| Brake Settings | see Brakes | Brake force and parking brake behaviour. |
| Steering Settings | see Steering | Differential and neutral steering. |
| Speed Control Settings | see Speed control | Speed limiter and cruise cancel. |
| Anti Roll Stiffness | 800000 | Anti-roll force per unit of compression difference (Unreal force units, kg·cm/s²); 0 disables it. |
| Auto Tune Suspension | true | At BeginPlay, sets every spring so the chassis mass rests in the middle of the suspension travel. |
| Clients Simulate Physics | true | See Networking. |
| Input Resend Interval | 0.1 s | Unchanged input is re-sent to the server at this interval. |
| Throttle Axis Name / Steering Axis Name | None | Optional legacy input axes bound automatically. |
| Debug Force Scale | 0.00002 | Length of the force arrows drawn by TrackForge.Debug, in cm per force unit. |
| On Gear Changed | event | Fires with the new gear when a gear change completes. |
Every physics step the vehicle reads the input, applies cruise control and the speed limiter, updates the gearbox and engine speed, computes the drive and brake force of each track, updates the suspension of both tracks, applies the anti-roll forces and finally solves the track-to-ground friction and the new track speeds.
Driving input
| Node | Type | Description |
|---|---|---|
| Set Throttle Input (Value) | call | -1 to 1. Forward / backward in automatic mode, forward and brake in manual mode. |
| Set Steering Input (Value) | call | -1 (left) to 1 (right). Differential steering in motion, neutral steer at a standstill. |
| Set Brake Input (Value) | call | Service brake on both tracks, 0 to 1. |
| Set Service Brakes (Left, Right) | call | Service brake per track, 0 to 1 (brake steering). |
| Set Parking Brake (Engaged) | call | Locks both tracks. |
| Set Parking Brake Side (Side, Engaged) | call | Locks one track. |
| Is Parking Brake Engaged (Side) | pure | Parking brake state of a track. |
| Get Input State | pure | The FTrackForgeInputState the simulation uses on this machine. |
Input values are clamped and invalid numbers are ignored. The setters work for players, AI controllers and for unpossessed vehicles on the server (for example driven by the Level Blueprint).
Engine
struct FTrackForgeEngineSettings (Engine Settings).
| Field | Default | Description |
|---|---|---|
| Torque Curve | None | Curve Float: X = engine RPM, Y = torque in N·m. When empty the built-in curve is used. |
| Max Torque | 2200 N·m | Peak of the built-in curve (55 % at 0 RPM, 85 % at 30 % of Max RPM, 100 % at 55 %, 92 % at 85 %, 75 % just below the limiter). |
| Idle RPM | 800 | Lowest engine speed. |
| Max RPM | 2800 | Rev limiter: no torque at or above this speed. |
| Engine Brake Torque | 250 N·m | Braking torque with the throttle released in gear. |
| Free Rev Rate | 2500 RPM/s | How fast the engine revs in neutral or while shifting. |
In gear the engine speed follows the sprockets: RPM = average sprocket speed × total ratio × 60 / 2π (never below idle). Each track receives half of torque × total ratio × efficiency / sprocket radius. pure Get Engine RPM and pure Get Engine Torque At RPM (RPM) read the engine.
Gearbox
struct FTrackForgeGearboxSettings (Gearbox Settings). Gears are numbered -1 (reverse), 0 (neutral) and 1..N (forward).
| Field | Default | Description |
|---|---|---|
| Mode | Automatic | Automatic or Manual. |
| Forward Gear Ratios | 4.0, 2.6, 1.7, 1.05 | One entry per forward gear. |
| Reverse Gear Ratio | 3.5 | Ratio of the reverse gear. |
| Final Drive Ratio | 5.0 | Applied after every gear. |
| Efficiency | 0.9 | Drive train efficiency. |
| Shift Time | 0.35 s | No drive torque while a gear change is in progress (0 = instant). |
| Upshift RPM Ratio / Downshift RPM Ratio | 0.9 / 0.45 | Automatic mode shift points as fractions of Max RPM. |
| Direction Change Speed Kmh | 2 | Automatic mode: forward and reverse are swapped only below this speed. |
Automatic: positive throttle engages first gear, the gearbox shifts up at the upshift point while accelerating and down at the downshift point. Holding negative throttle brakes the vehicle and, once it is nearly stopped, engages reverse; negative throttle then drives backward. Manual: select gears with Shift Up, Shift Down or Set Gear (Gear); positive throttle drives in the direction of the gear and negative throttle brakes.
| Node | Type | Description |
|---|---|---|
| Shift Up / Shift Down / Set Gear | call | Select a gear; switches the gearbox to manual. |
| Set Gearbox Mode (Mode) | call | Automatic or Manual at runtime (replicated with the input). |
| Get Gearbox Mode, Get Current Gear, Is Shifting, Get Num Forward Gears | pure | Gearbox state. |
| Get Gear Ratio (Gear) | pure | Gear ratio times final drive (0 for neutral). |
Brakes
struct FTrackForgeBrakeSettings (Brake Settings).
| Field | Default | Description |
|---|---|---|
| Max Brake Force | 150000 N | Service brake force per track at full brake input. |
| Brake With Opposite Throttle | true | Automatic mode: throttle against the gear direction brakes both tracks. |
| Parking Brake On Start | false | Both parking brakes are engaged at BeginPlay. |
| Release Parking Brake On Throttle | false | Throttle input releases both parking brakes. |
The service brake slows the track itself (it never reverses it); the ground friction then slows the vehicle. A parking brake locks its track: the track speed stays zero and the track acts as part of the chassis, so the friction holds the vehicle on slopes.
Steering & neutral steer
struct FTrackForgeSteeringSettings (Steering Settings).
| Field | Default | Description |
|---|---|---|
| Steering Differential | 1.0 | In motion each track gets drive × (1 ± steering × differential). |
| Steer Brake Strength | 0.25 | Fraction of the service brake applied to the inner track while steering above 1 km/h. |
| Allow Neutral Steer | true | Pivot on the spot with steering and no throttle. |
| Neutral Steer Max Speed Kmh | 5 | Neutral steer is used below this speed. |
| Neutral Steer Throttle Deadzone | 0.1 | Throttle below this magnitude counts as no throttle (also the automatic gearbox deadzone). |
| Neutral Steer Input Scale | 1.0 | Drive command of each track at full steering during a neutral steer. |
During a neutral steer the left track drives at +steering and the right track at -steering; the automatic gearbox engages first gear for it. In manual mode a neutral steer needs a gear selected.
Cruise control & speed limiter
Both use the vehicle's SpeedController (TrackForge PID Controller) on the error in km/h. struct FTrackForgeSpeedControlSettings (Speed Control Settings):
| Field | Default | Description |
|---|---|---|
| Speed Limit Kmh | 0 (off) | The throttle is reduced so the forward speed does not exceed the limit. |
| Limiter Margin Kmh | 3 | The limiter starts acting this far below the limit. |
| Cancel Cruise On Brake | true | Braking or negative throttle switches cruise control off. |
| Node | Type | Description |
|---|---|---|
| Set Cruise Control (Enabled, Target Speed Kmh) | call | Holds a forward speed; the driver can still accelerate harder. A negative PID output brakes (downhill). |
| Is Cruise Control Active | pure | Cruise control requested. |
| Set Speed Limit (Speed Limit Kmh) | call | Sets the limiter (a setting: call it on the server, which runs the authoritative physics). |
TrackForge PID Controller
Component UTrackForgePIDController: Num Of Errors To Store (5, minimum 3), Proportional Coefficient (0.1), Integral Coefficient (0), Derivative Coefficient (0.05). Nodes: Add Measured Error (FTrackForgePIDErrorItem: Measured Value, Delta Time), Get Control Coefficient (0 until three errors are stored), Reset Controller, Get Num Stored Errors. The integral term sums the stored errors times their delta time; the derivative term uses the last two errors.
Tracks & friction
Component UTrackForgeTrackComponent — displayed as TrackForge Track. A row of suspension stacks plus the track's own speed. Its X axis points forward along the track.
| Property | Default | Description |
|---|---|---|
| Effected Component Name | Chassis | Primitive component receiving the forces; the owner's root is used when no component has this name. |
| Side | Left | Left or Right. |
| Disabled | false | Turns the track off. |
| Track Friction Settings | Mu X 0.75 / 0.5, Mu Y 1.0 / 0.75, isotropic | Static / kinetic friction along (X) and across (Y) the track, plus per-surface coefficients. The vehicle uses Mu X 1.0 / 0.8, Mu Y 0.5 / 0.35 (anisotropic) and a rolling coefficient of 0.02 on the Default surface. |
| Surface Friction | None | Optional surface friction asset overriding the per-surface list. |
| Suspended Wheels | empty | One suspension setting per road-wheel. |
| Sprocket Radius | 30 cm | Converts torque to track force and track speed to sprocket speed. |
| Track Mass | 1500 kg | Effective mass of the moving track and drive train. |
| Node | Type | Description |
|---|---|---|
| Update Physics (Delta Time) | call | Updates the suspension stacks (suspension only). |
| Simulate Track (Delta Time, Drive Force, Brake Force, Locked, Total Contact Points) | call | After Update Physics: drive and brake the track, solve friction at every grounded road-wheel and update the track speed. Forces are in Unreal units (kg·cm/s²). |
| Create Sub Objects | call | Re-creates the stacks after editing Suspended Wheels at runtime. |
| Set Effected Mesh Reference, Toggle Debug Mode | call | Set the chassis manually; toggle the stacks' own debug drawing. |
| Get / Set Track Linear Speed, Get Sprocket Angular Speed, Get Ground Speed, Get Track Slip | pure | Track speed (cm/s), sprocket speed (rad/s), vehicle speed over the ground along the track, slip -1..1. |
| Get Num Grounded Wheels, Get Num Suspension Stacks, Get Suspension Stack, Get Suspension Stacks, Get Last Friction Force, Get Rolling Resistance Force, Get Effected Component | pure | State of the last step. |
| Draw Track Debug (Force Scale) | call | Draws rays, contacts and force arrows for one frame. |
Friction is Coulomb friction with a stopping force: at each contact the force that would cancel the relative velocity of the track surface against the ground is clamped by normal force × mu static, or by the kinetic limit once exceeded. With anisotropic friction the coefficients come from the friction ellipse. Along the track the chassis and the moving track are solved together (reduced mass), so the engine force reaches the chassis without overshoot; the reaction slows the track.
TrackForge Friction (standalone)
Component UTrackForgeFrictionComponent processes contacts you register yourself (collision hits or suspension contacts): Register Friction Point, Physics Update (returns the normalized reaction force and rolling friction force), Set Friction Surface Velocity / Set Friction Surface Speed, Reset Friction Points, Is Friction Point Active, Get Friction Force, Get Friction Limit, Set Effected Component Reference, Toggle Debug Mode. Properties: Effected Component Name (none), Mu X Static 0.75, Mu X Kinetic 0.5, Use Anisotropic Friction false, Mu Y Static 1.0, Mu Y Kinetic 0.75, Physics Surface Response (rolling friction per surface), Surface Friction (asset), Is Alternate Friction (also counters gravity on slopes), Is Debug Mode.
TrackForge Vehicle Suspension
Component UTrackForgeVehicleSuspensionComponent updates several tracks of a custom vehicle with one Update Physics call. Tracks Configuration lists track components by name (empty = every TrackForge Track of the actor); Effected Component Name (Chassis) is passed to all of them. Get Tracks returns them.
Suspension & anti-roll
Object UTrackForgeSuspensionStack with struct FTrackForgeSuspensionSettings. A stack traces from the spring top to the spring bottom offset, places the wheel hub at the contact and pushes the sprung component with spring and damper force.
| Field | Default (vehicle) | Description |
|---|---|---|
| Simulation Mode | Ray Check | Ray Check, Sphere Check (needs Can Sphere Check) or Shape Sweep (needs Can Shape Sweep and a Sweep Shape Component Name). |
| Use Custom Position / Stack Local Position | false / 0 (true / X positions) | Several stacks in one component. |
| Use Custom Transform / Stack Local Transform | false | Full local transform of the stack. |
| Road Wheel Radius / Track Thickness | 15 / 3 cm (30 / 4) | Offset between contact and hub. |
| Spring Top Offset / Spring Bottom Offset | (0,0,10) / (0,0,-10) ((0,0,0) / (0,0,-40)) | Travel of the hub. |
| Spring Stiffness | 1000000 (auto-tuned) | Force of the spring; it should carry its share of the weight: mass × 980 / number of stacks. |
| Spring Max Output Ratio | 1.05 | Force at full compression as a ratio of the stiffness (1 cm ramp, then stiffness to stiffness × ratio). |
| Spring Dampening | 10000 (60000) | Damper coefficient, limited to the spring force. |
| Get Contact Body Velocity | false | Reads the velocity of the touched body (moving platforms). |
| Enable Debug Mode | false | The stack draws its own traces and forces. |
| Ray Check Trace Channel / Sphere Check Trace Channel | Visibility | Trace channels. |
| Rotate Along Trace Vector | false | Shape Sweep: align the sweep shape's Z with the sweep direction. |
Stack nodes: Physics Update, Initialize, Get Suspension Force, Get Contact Data, Get Wheel Hub Position, Get Wheel Hub Transform, Set Sprung Component Reference, Set Sweep Shape Component Reference, Set Spring Stiffness, Set Spring Offsets, Set / Get Suspension Force Scale (active suspension), Get Suspension Compression Ratio (0 extended, 1 compressed), Apply Anti Roll Force, Is In Contact, Get Last Trace Segment, Toggle Debug Mode. The TrackForge Suspension Stack component (UTrackForgeSuspensionStackComponent) holds one stack at its own position.
Anti-roll stabiliser
After the suspension update the vehicle pairs the stacks of both tracks by index. For each pair touching the ground it applies Anti Roll Stiffness × (left compression - right compression) upward on the more compressed side and the same force downward on the other side, like an anti-roll bar. The extra load also feeds the friction of those wheels.
Surface friction asset
Data Asset UTrackForgeSurfaceFrictionAsset — create one with Add > Miscellaneous > Data Asset > TrackForge Surface Friction. Physical surfaces are defined in Project Settings > Physics > Physical Surface and assigned through physical materials.
| Property / node | Default | Description |
|---|---|---|
| Physical Surface Friction Coefficients | empty | Entries of FTrackForgeSurfaceFriction: Physical Surface, Friction Scale Factor (1), Rolling Friction Coefficient (0). |
| Default Friction Scale / Default Rolling Friction Coefficient | 1 / 0 | Used for surfaces that are not listed. |
| Find Surface, Get Friction Scale, Get Rolling Friction Coefficient, Get Friction Scale For Material | read | Lookups by surface or physical material. |
| Set Surface | call | Adds or replaces an entry at runtime. |
Assign it to Surface Friction on a track (or a friction component): every friction coefficient is multiplied by the touched surface's scale (ice 0.15, mud 0.6, asphalt 1.1...), and rolling resistance is normal force × rolling coefficient.
Track animation
Component UTrackForgeTrackAnimationComponent — displayed as TrackForge Track Animation. Rotates sprocket, idler and road-wheel meshes, moves tread instances of an Instanced Static Mesh along a spline (in the XZ plane of the spline component), sags the upper run and scrolls track materials.
| Property | Default | Description |
|---|---|---|
| Sprockets Idlers Roadwheels Names | empty | Mesh components rotated with the track. |
| Track Spline Component Name | none | Spline defining the path of the track. |
| Treads Instanced Mesh Component Name | none | ISM rendering the treads ('none' = render them yourself from Get Treads Transform Array). |
| Animated Track Spline Points | empty | Spline points that follow a socket of a mesh. |
| Treads On Side / Angle Between Sprocket Teeth | 30 / 18° | Number of treads; 360 / number of sprocket teeth. |
| Flip Animation, Animation Lag Compensation | false | Reverse the animation; update treads one frame late to match skeletal meshes. |
| Two Parts Track / Second Track Part Offset / Second Treads Instanced Mesh Component Name | false / 0 / none | Two-piece tread links. |
| Track Spline Point Locations / Tangents | empty | Optional default spline set by Build Track Mesh And Spline. |
| Side / Drive From Vehicle | Left / true | On a TrackForge Tracked Vehicle the vehicle sets the speed of this side and updates the animation every frame. |
| Track Tension | 1 | 1 = taut, 0 = fully slack. |
| Max Sag Depth | 10 cm | Sag of the middle of the upper run at zero tension. |
| Scroll Materials | empty | Material instances receiving the scroll parameters. |
| Scroll Offset Parameter Name / Scroll Speed Parameter Name | TrackOffset / TrackSpeed | Scalar parameters: accumulated offset (0-1, wraps) and speed in cm/s. |
| Scroll UV Per Cm | 0.01 | UV units scrolled per cm of track travel. |
| Node | Type | Description |
|---|---|---|
| Build Track Mesh And Spline | call | From the construction script: set the default spline and create the tread instances (rebuilding never duplicates them). |
| Update Track Animation (Delta Time) | call | Advances the animation; returns tread and parts angles and the parts rotator. |
| Set Track Parts Angular Velocity (rad/s), Set Track Linear Speed (cm/s, Sprocket Radius) | call | Speed of the animation. |
| Set Track Tension, Get Current Sag | call | Track tension feeding the tread placement. |
| Add Scroll Material, Create Scroll Material (Mesh, Element Index), Clear Scroll Materials, Get Scroll Offset, Get Track Linear Speed | call | Material UV scrolling. |
| Get Treads Transform Array, Get Secondary Treads Transform Array, Get Track Angular Position | call | Tread transforms for custom rendering. |
TrackOffset to the V (or U) texture coordinate. Call Create Scroll Material with the track mesh at BeginPlay; the offset then follows the track speed of that side.Road-wheel sync
Component UTrackForgeWheelSyncComponent — displayed as TrackForge Wheel Sync. Ticks after physics; spins road-wheel components by the speed of their track and moves them with the wheel hub of their suspension stack. Works on the tracked vehicle and on any actor with TrackForge Track components.
Wheel field (FTrackForgeWheelVisual) | Default | Description |
|---|---|---|
| Component Name | none | Scene component of the wheel. |
| Side | Left | Track driving the wheel. |
| Wheel Radius | 30 cm | Spin = track travel / radius. |
| Suspension Index | -1 | Stack of that track to follow (-1 = none). |
| Follow Suspension / Vertical Offset | true / 0 | Height = hub height in the wheel's parent space + offset. |
| Reverse Rotation / Spin | false / true | Spin direction; spin on or off. |
Nodes: Refresh Wheels (after editing Wheels at runtime), Update Wheels, Get Wheel Angle, Get Side Speed. The rest rotation and position of each wheel are kept; only the spin and the height change.
Turret
Component UTrackForgeTurretComponent — displayed as TrackForge Turret. The component itself is the yaw ring; attach your turret mesh to it and your gun mesh (or a gun pivot) below it, then name the gun in Gun Component Name.
| Property | Default | Description |
|---|---|---|
| Gun Component Name | none | Child scene component that pitches ('none' = yaw only). |
| Yaw Speed / Pitch Speed | 40 / 20 °/s | Maximum turning rates. |
| Limit Yaw / Min Yaw / Max Yaw | false / -180 / 180 | Optional traverse limits (casemate guns). |
| Min Pitch / Max Pitch | -10 / 20 | Gun depression and elevation. |
| Aim Send Interval | 0.2 s | Resend interval of the client's aim request. |
| Node | Type | Description |
|---|---|---|
| Set Aim Target (World Location) | call | Track a point (for example the camera's aim point). |
| Set Aim Input (Yaw Input, Pitch Input) | call | Rate control, -1..1 of the speeds. |
| Set Desired Angles (Yaw, Pitch) | call | Turn to angles relative to the rest rotation. |
| Clear Aim Target | call | Hold the current angles. |
| Get Current Yaw / Pitch, Get Desired Yaw / Pitch, Is Aimed At Target (Tolerance), Get Aim State, Get Gun Component, Get Aim Direction | pure | Aim state; Is Aimed At Target is false while the goal is outside the limits. |
Telemetry
pure Get Telemetry returns struct FTrackForgeTelemetry, updated every physics step:
| Field | Description |
|---|---|
| Speed Kmh / Forward Speed Kmh | Chassis speed and signed speed along its forward axis. |
| Engine RPM / Engine Torque | Engine speed and the torque currently produced (N·m). |
| Gear / Shifting | Current gear and gear change in progress. |
| Left / Right Track Speed | Track surface speeds in cm/s. |
| Left / Right Slip | (track speed - ground speed) / max(|track|, |ground|, 1 m/s), -1..1. |
| Grounded Wheels / Total Wheels | Road-wheels touching the ground / all road-wheels. |
| Throttle / Steering | Throttle after cruise control and limiter; steering. |
| Neutral Steer, Cruise Active, Speed Limiter Active, Parking Brake Left / Right | States. |
Also: Get Track Speed (Side) in cm/s, Get Forward Speed Kmh, Get Track (Side) and the helpers TrackForge cm/s to km/h / TrackForge km/h to cm/s.
Networking
The tracked vehicle replicates and replicates its movement. The server is authoritative:
- The controlling client writes its input locally and sends it to the server with an unreliable Server RPC when it changes and every Input Resend Interval. The server clamps the values.
- The server runs the physics with that input, writes the drive train state (track speeds, RPM, gear) and replicates the input to the other clients (skip owner).
- With Clients Simulate Physics on (default), clients run the same physics with their input or the replicated input as a prediction, and the engine's replicated physics movement corrects them towards the server. With it off, clients stop simulating the chassis and only follow the replicated movement; their telemetry, track speeds, RPM and gear come from the server.
- The turret component replicates too: the controlling client predicts its turret and sends its aim request; the server's angles replicate to the other clients.
pure Is Simulating Locally tells whether this machine runs the physics. Settings changed at runtime (speed limit, tuning) are not replicated: change them on the server.
Debugging
Console variable TrackForge.Debug 1 draws, for every TrackForge Tracked Vehicle, the suspension rays (green hit, yellow miss), contact points, hub positions, suspension force (blue) and friction force (orange) arrows, plus a telemetry text above the vehicle (speed, gear, RPM, torque, track speeds, slip, grounded wheels and active modes). It does nothing in shipping builds. Each stack also has its own Enable Debug Mode, and the friction and animation components have Is Debug Mode / Debug Mode.
Physics pawn & library
Pawn ATrackForgePawn — displayed as TrackForge Physics Pawn. Its root must be a primitive component that simulates physics.
| Node / property | Type | Description |
|---|---|---|
| TrackForge Physics Tick (Substep Delta Time) | event | Runs on every physics step of the root body. On UE 4.27 (PhysX) with physics sub-stepping enabled it runs on every sub-step; on UE 5.8 (Chaos) it runs once per frame with the physics delta time. |
| TrackForge Post-Physics Tick (Delta Time) | event | Once per frame after physics (not on dedicated servers). |
| TrackForge Get Transform -Pawn | call | Transform of the root body, valid during sub-steps. |
| Physics Transform | property | Root body transform updated at each physics step. |
Function Library UTrackForgeLibrary — sub-stepping friendly nodes that work on the physics body directly:
| Node | Description |
|---|---|
| TrackForge Get Transform -Comp / -Actor, TrackForge Set Transform -Comp | Read or set body transforms (with optional socket). |
| TrackForge Add Force -Comp, Add Force At Location -Comp, Add Torque -Comp | Forces and torques that are valid inside a physics step. |
| TrackForge Set Inertia Tensor -Comp | Mass-space inertia tensor of a body. |
| TrackForge Get Mesh / Primitive / Scene / Spline / Instanced Static Mesh Component Reference by Name | Find components of the owner by name. |
| TrackForge Get Friction Coefficients from Friction Ellipse | Static and kinetic mu for a direction. |
| TrackForge Set Physics Constraint Linear Break Threshold | Makes a constraint breakable at a force. |
| Spherical to Unit Cartesian, Unit Cartesian to Spherical | Coordinate conversions. |
| TrackForge Get Physical Surface Name, TrackForge Get Physical Surface From Material | Surface helpers. |
C++
#include "TrackForgeVehiclePawn.h"
#include "TrackForgeTurretComponent.h"
void AMyTank::SetupPlayerInputComponent(UInputComponent* Input)
{
Super::SetupPlayerInputComponent(Input);
Input->BindAxis("MoveForward", this, &AMyTank::SetThrottleInput);
Input->BindAxis("MoveRight", this, &AMyTank::SetSteeringInput);
}
void AMyTank::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
const FTrackForgeTelemetry Data = GetTelemetry();
EngineAudio->SetFloatParameter("RPM", Data.EngineRPM);
if (UTrackForgeTurretComponent* Turret = FindComponentByClass<UTrackForgeTurretComponent>())
{
Turret->SetAimTarget(GetAimPoint());
}
}
// Highway mode
SetCruiseControl(true, 35.0f);
SetSpeedLimit(50.0f);
Override SimulatePhysicsStep(float) in a ATrackForgePawn subclass to run your own code on every physics step. FTrackForgeFrictionMath (Solve, GetMuFromFrictionEllipse) exposes the friction solver to C++.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| The vehicle falls through or lies on its belly | The suspension rays must reach the ground: check the track positions and the spring offsets with TrackForge.Debug 1. The rays ignore the vehicle itself and use the Visibility channel. |
| The vehicle sits too high or bottoms out after changing the mass | Keep Auto Tune Suspension on, or set Spring Stiffness to mass × 980 / number of stacks. |
| It will not pivot | Lower Mu Y Static / Kinetic of the tracks, raise Max Torque or Neutral Steer Input Scale, and keep the throttle inside the deadzone. |
| It does not move | Check the parking brakes, that the controller calls Set Throttle Input on the controlling machine, and that the chassis simulates physics. |
| Jitter on clients | Leave Clients Simulate Physics on for prediction, or turn it off to follow the server only. |
| Treads do not move on a vehicle | Set the animation component's Side and keep Drive From Vehicle on; check the spline and ISM names. |
| The physics tick looks less smooth on UE 5.8 | Chaos runs the physics tick once per frame; keep a steady frame rate or enable a fixed physics tick in the project settings. |
Credits
© 2026 Alpha XP — alphaxp.net · Support: support@alphaxp.net. Built for Unreal Engine 4.27 and 5.8.