Previous article: Open-World Player Vehicle Driving: Collision, Damage, and Reco— How a Vehicle Remains Recoverable After Damage
P8 examined how driving commands enter the physical world, while P9 examined how collisions and damage return to the runtime. This article continues with another often-simplified problem: How can the vehicle’s occupants simultaneously aim, fire, operate the turret, or otherwise interact when the vehicle still assumes route execution, steering, and speed control?
Introduction: Vehicle movement and in-vehicle interaction do not share the same task life cycle
In the open world, in-vehicle interactions while the vehicle is in motion typically do not suspend driving. The driver needs to keep the vehicle moving along the road, and the crew may simultaneously observe the target, adjust the direction of the weapon, shoot, switch weapons, or complete specific actions under the constraints of the mission script. What the player sees is a continuous scene: the vehicle moves forward, the camera follows the vehicle body, the crosshair points to the target on the side of the road, the weapon is launched at the right time, and the vehicle still changes direction according to the driving input.
From a runtime perspective, this scenario contains at least four groups of simultaneously changing states:
- Vehicle route, speed, steering and physical feedback;
- Character’s seating, posture, weapons and upper body movements;
- The target’s entity, position, speed and aimable status;
- Constraints on current interactions by tasks, scripts, and presentation layers.

If these states are directly modified by the same task or the same controller, the system will rapidly develop conflicting responsibilities. Aiming actions may override steering inputs, vehicle turns may cause the crosshair to jump suddenly, weapon status may remain when the crew switches seats, and turret rotation may use a different directional source than character animation.
Therefore, the core question of this article is not “how to add shooting function to the vehicle”, but:
How driving execution and in-car interaction can exist in parallel on the same vehicle, sharing state and submitting control separately when necessary.
This article understands in-vehicle combat as a parallel runtime. It has independent interaction intentions, command windows, status advancement and result feedback, but it does not replace vehicle motion control, nor does it inherit the entire life cycle of vehicle tasks.
Names such as “In-Vehicle Player State Router”, “Target Service”, “Vehicle Weapon Actuator” and “Turret Execution/Joint Layer” in the article are all responsibility aliases adopted to facilitate public discussion and do not mean that there is a same-named, single or resident object in the source code. Source code facts, architectural abstractions, and migration implications are explained separately.
1. Parallel relationship between vehicle motion and in-vehicle interaction
After the vehicle enters the combat state inside the vehicle, the most common misunderstanding is that the system switches the vehicle from driving mission to combat mission. For open world vehicles, this switch is often too rough. The vehicle can continue to drive, the crew can aim independently, the on-board weapons can have their own orientation and cooling status, and the mission may require the vehicle to maintain a certain route or speed range.
Therefore, in-vehicle combat is not primarily a replacement of driving tasks, but an addition of a parallel consumption path to the existing vehicle operation.

The two chains in the figure maintain vehicle motion and in-vehicle interaction respectively; they exchange status through seat relationships, vehicle capabilities and task constraints, but do not directly take over each other’s execution responsibilities.
The current vehicle motion control chain continues to maintain propulsion, steering, and braking semantics; its source can be the player, AI, script, or recotask. The in-vehicle interaction chain only submits requests belonging to character weapons, fixed weapons, or turret channels, and its scope does not extend to route clearing or vehicle actuator replacement; the latter two are still maintained by the motion control domain and command arbitration layer.
Five types of responsibilities for in-vehicle combat
When reading the source code, “battle” needs to be broken down into five types of responsibilities instead of three vertical control objects:
The first is interaction intent. It answers whether the character, crew, or script wishes to aim, fire, load, throw, or exit the current weapon state. This intent usually comes from player input, mission instructions, or canned scripts and does not equate to the fact that the shooting actually occurred.
The second is cross-submission qualifications. It answers whether the current source still has seats, modes, and mission clearances, and whether weapons, turrets, and targets meet submission conditions.
The third is state ownership. Character weapons, fixed vehicle weapons, and turrets may each maintain different persistence states, while seating relationships and vehicle capabilities provide lateral constraints.
The fourth is action execution. Character poses, turret joints, and launch execution each convert accepted requests into concrete actions. Action execution is not responsible for reselecting targets or replacing driving commands.
The fifth is the result fact. Ammunition changes, projectile generation, hit, momentum, damage, and performance feedback are execution results; these results can be consumed by the task, camera, and presentation layer, but should not serve as the sole source of interaction intent.
There is a relationship between the five types of responsibilities, but “state ownership” is not a stage in the life cycle of a request. It exists before the request is established and may continue to exist after the request ends. A more accurate expression should be split into two parts:


The resulting facts still need to be differentiated: the submission first produces changes in projectiles, trajectories and ammunition, and then may produce hit facts, and the hits are then converted into a sustained state by the damage system. Damage is not always an immediate result of direct possession of the weapon’s actuator.
This chain forms a parallel relationship with the driving command of the command layer. the command layer’s driving commands are responsible for vehicle movement, and the in-vehicle combat commands are responsible for crew or vehicle-mounted weapon interaction. Both chains may read vehicle status, but each only submits requests in its own field and does not assume the control responsibilities of the other.
2. Player status in the car: interaction entrance and relationship routing
Source code entry usually starts with the player already in the vehicle seat. This entrance needs to determine whether the current character is still driving, riding, requesting to exit, entering weapon mode, and whether to switch to the turret or projectile branch.
This type of entrance is best abstracted as an “in-car player state router”. Its job is to select which upper-level branch should currently run, rather than implementing all the driving, aiming and shooting logic itself.
State changes that the router needs to handle
A stable in-car routing must at least observe the following changes:
- Whether the identity of the driver or passenger is still valid;
- Whether the current seat still allows the use of weapons;
- Whether the current vehicle has corresponding weapons or turrets;
- Whether the player intends to aim, shoot, load or throw;
- Whether the current target is still valid;
- Whether the vehicle is damaged, out of control, waiting for physical or mission limitations;
- Whether the current weapon branch has been completed, canceled or interrupted by higher constraints.

A router must not interpret “fire input” as an immediate vehicle launch. The input first enters the relevant controller, target service, and weapon-mode task; the lower layer then confirms execution eligibility.
● Why can’t vehicle tasks directly read player input?
If the vehicle side directly reads player input eframe, three problems will arise.
First, vehicles controlled by AI or scripts cannot reuse the same set of interactive entrances. If the vehicle side task is directly bound to the local player, other control sources must reimplement a set of paths; recording and playback should only reuse the defined interaction contract in subsequent stages.
Second, player input is mixed with weapon qualifications. A player may intend to shoot, but the seat may not allow shooting, the weapon may not be fully loaded, and the vehicle may be disabled. The input reader is only responsible for saving the intent, and the seat, weapon mode, and vehicle capabilities are responsible for access judgment respectively.
Third, control source boundaries are bypassed. Players, AI, scripts and recotasks need to submit motion intentions through their respective command windows; the motion chain only consumes currently accepted commands and does not directly determine the local device status.
A more stable organization method is: the movement source generates the movement intention first, the interaction source generates the interaction intention, the in-vehicle state router selects the interaction branch, the current task confirms the submission qualification, and the weapon or turret actuator submits the actual request.
3. Aiming, Targeting and Weapon Execution
The direction of the crosshair, the direction of the character’s upper body, the direction of the weapon’s muzzle, and the direction of the vehicle turret in the player’s perspective are not necessarily the same. They may have different angles, delays, and constraints at the same time.
Therefore, the targeting system needs to maintain at least three levels:
Logical aiming direction
Logical aiming direction comes from the control view, crosshair, and player input. It describes where the player wishes to observe or point, and is the input for target query and aiming intent. The camera can provide a baseline for observation, but lens shake, script transitions, and performance offsets are only performance-side states and cannot directly become facts about turrets or ballistics.
● Character weapon direction
Character weapon orientation is constrained by seating, body posture, bones, weapon grip, and rotatable range. The character can look toward a target, but the arms and muzzle may not be immediately aimed at the target during the current action phase.
● Vehicle weapon or turret direction
Turret orientation is determined by a combination of vehicle weapons components, turret joints, and pitch and horizontal rotation limits. For fixed-orientation vehicle-mounted weapons, the allowed directions may be narrower; for rotatable turrets, the system also needs to handle rotational speed, initial orientation, rotational acceleration and seat control rights.
Multiple layers of conversion are required between logical aiming direction, target calculation, component direction and final muzzle direction:

This structure also explains why the target service cannot just save an entity pointer. Targeting services need to maintain lock entities, free aiming positions, target speeds, launch offsets, and fallback directions after target failure.
Target service: maintain target facts instead of determining task results
In vehicular combat, target status often changes before weapon status. The target may leave the field of view, enter occlusion, leave the lockable range, switch vehicles, or temporarily have no valid position due to network update delays.
Targeting services should provide a stable target abstraction, rather than directly interpreting target loss as a battle loss.
● Basic input for the target service
The target service may read:
- Current camera ray or crosshair direction;
- Player lock status;
- The position and speed of the target entity;
- The target’s bones, vehicle seats or hittable parts are offset;
- Current weapon launch offset;
- Whether the target is visible, lockable or attackable;
- Constraints on the goals of the current task.
● Output of target service
It can output:
- the current target entity;
- Current target location;
- Position corrected for launch offset;
- Whether the goal has changed;
- Whether the target is temporarily invalid;
- Whether the target needs to be reselected;
- Whether the target state needs to be synchronized.
The target service only maintains target facts and target status. If a target is temporarily invisible, you may only need to continue searching; if a target leaves the range, the vehicle may need to maintain its route; if a mission target is destroyed, the mission holding the target may be triggered to enter the next state.
● Why does the target position need to be offset?
The shooting position usually cannot use the entity origin directly. Characters, vehicles and large vehicles all have different hit areas, and weapons may be fired from the muzzle, barrel, side pod or hull fixed points. The targeting service needs to convert logical targets into target locations suitable for the current weapon.
Such offsets may also be related to target speed. For moving targets, the system may correct the target position based on speed and predicted time; for low-speed vehicles, walking targets, or remote players, the correction rules may also be different. Public articles need not recite especific formula, but a key boundary should be preserved: target selection, target position correction, and weapon launch do not belong to the same layer of responsibility.
4. Separation of driving, aiming and control
The input dimensions of driving control and aiming control are different. Driving consumes longitudinal propulsion, braking, steering and vehicle modes; aiming consumes perspective direction, target selection, shooting and weapons modes. Both can be valid at the same time, but it does not mean that they have the same priority or modification scope.
Stability constraints for driving control
The current vehicle motion control chain continues to consume:
- Current motion command or local target;
- Propulsion, braking and steering semantics;
- Immediate constraints for the avoidance layer;
- Vehicle capacity limitations;
- Physics feedback and damage constraints for the previous installment.
Local constraints on combat inside the car
Weapon missions require confirmation:
- whether the occupant is in an available seat;
- Whether weapons are allowed to be used in the current seat;
- Whether the current target is valid;
- Whether the current aiming or firing status meets the access conditions;
- Whether vehicle movement, damage or mission status limits shooting;
- Whether the weapon is reloading, cooling down or switching.
The intersection between the two mainly occurs at vehicle status reading and execution qualification judgment, rather than by overwriting each other’s tasks.
How to connect parallel command windows
In a runtime update, a similar processing relationship can be observed, but it is not a fixed global execution order in the source code:
1. The motion control domain obtains the current route, speed, vehicle capabilities and physical feedback; 2. The interaction control domain obtains the current interaction source, target, mode and seating relationship; 3. The two control domains form motion requests and interaction requests respectively; 4. The respective executors submit actions based on the qualifications of this domain; 5. Physics, weapons and performance systems return result facts; 6. The task and status layers consume feedback and update the next command window.
“Submit separately” here does not mean that the system is completely isolated. Weapon firing may produce recoil, impulse and sound; vehicle damage may limit weapon rotation; driving status may change character posture and camera shots. However, these effects should be propagated through clear state and feedback channels, rather than being directly written to the entire vehicle state by an interactive task.
Execution branches for different in-car interactions
When reading the source code, all “fire in the car” are often classified into the same task, which is inaccurate. At least three categories of runtime paths can be distinguished.
● The crew holds a gun or shoots sideways
This category is usually completed by a combination of character seats and weapon missions. The character needs to deal with upper body movements, gun status, aiming direction, shooting rhythm and seat constraints; the vehicle continues to perform driving tasks. Muzzle position and target position are related to character skeleton, vehicle movement and camera direction.
● Projectiles or special weapons in the vehicle
Projectiles often have different charge, release, and trajectory logic. It may temporarily override character upper body motion, but should not automatically override vehicle motion. The vehicle’s route, speed and steering are still maintained by vehicle-side actuators.
● Turret or fixed vehicle-mounted weapons
Turret weapons have their own orientation, rotation limits, and physical controls. Crew input or mission intent needs to be entered into the onboard weapons mission before being interpreted by the turret actuator. The rotation direction of the turret is not equal to the character’s body direction, and the turret’s firing qualification is not equal to the character having completed the aiming animation.
The three can share targeting services, weapon controllers, or admission semantics, but each still needs to retain independent motion interpretation. What is shared are control intentions and life cycle contracts, not specific aiming or launch control laws.
5. Turrets: animation, targeting and physics seams
The turret is the most prone to hierarchical confusion in vehicle combat. It simultaneously involves crew movements, target orientation, turret articulation and weapon firing. If you only understand the turret as a rotating component, you will ignore its relationship with the seat and mission.
● Animation layer
The crew is required to complete hand, body, head and torso movements based on the direction of the turret or target. Standing turrets may need to complete initial adjustments before allowing continuous rotation; animation tasks may also need to be interrupted or re-established when the crew turns, dodges, takes hits, or switches seats.
● Weapon layer
The vehicle-mounted weapons mission maintains aiming, firing, lock-on, cooldown, and weapon status. It can generate a turret control request based on the target direction, or refuse to establish a launch request when the seat is invalid, the weapon is invalid, or the target status is not met.
● Turret Execution / Joint Layer
The turret execution or joint layer is responsible for converting the desired directions into real part motion. It needs to handle rotation speed, angle limits, collisions and inertia. Execution feedback may in turn affect whether the weapon is eligible for launch, but it does not result in target selection or mission completion rights.
Therefore, turret control can be abstracted as:

This process requires the character task, weapon task and execution layer to be completed together; the weapon task cannot bypass physical constraints and directly write the final pose.
● Initial adjustment and continuous steering
When the turret enters combat, the initial direction may deviate significantly from the camera or target direction. The system needs to complete initial adjustments before entering continuous steering. During the initial adjustment period, the weapon may be allowed to display aiming intent, but is temporarily not allowed to fire; after the turret reaches an acceptable angle, the weapon mission will be fully qualified for firing.
The continuous steering phase also requires maintenance:
- Current horizontal and vertical angles;
- Target direction change;
- Maximum rotation speed;
- Steering acceleration or damping;
- Centering or maintaining the target after it is lost;
- Synchronization of crew movements and turret direction.
This explains why “the crosshair is pointed at the target” does not mean “the turret is ready to fire”. There is a time lag between logical aiming direction, target resolution, desired component direction, actual muzzle direction, and physical execution qualification.
6. Seat relationships and authority boundaries
P1 has distinguished between seat position, seat occupancy, driver status and command submission authority. In-vehicle combat continues to rely on this set of relationships, but with added weapon permissions and interaction permissions.
A seat may have the following status:
- Allowed to drive;
- Allowed to ride;
- Allows sideways shooting;
- The use of fixed weapons is allowed;
- Allows control of turrets;
- Allow switching weapons;
- Allows actions to be performed while the vehicle is moving.
These permissions should not be combined into a CanUseVehicle boolean value. The driver’s seat may allow driving but not the use of certain types of weapons; the turret seat may allow control of vehicle weapons but not exit to normal crew actions; the rear seat may allow side firing but cannot modify vehicle movement.
How seat changes affect combat status
Changing seats, getting out of the car, being pulled out, being hit, and dying may all change the current interaction. The system needs to decide:
- Whether the current aiming target is cleared;
- Whether the current weapon mission is over;
- Whether the current launch request is canceled;
- Whether the turret returns to the default direction;
- Whether the driving order continues;
- Whether other crew members gain control of weapons.
Changes in seating relationships cannot simply be manifested as deleting character references and then left to the discretion of the weapon mission. Changes need to be propagated to character tasks, vehicle weapon tasks, target services, and presentation layers with clear end conditions for each consumer.
Authorization matrix for drivers, passengers and on-board weapons
“Who is in control” needs to be broken down into multiple questions: who proposes vehicle motion intentions, who proposes interaction intentions, who determines seat and mode qualifications, who saves weapon status, who interprets and executes actions, and who produces world results. Driving and weapon rights can belong to different characters and can be transferred between mission phases.
· Question · Responsible Person ·
· — · — ·
· Who proposed the vehicle movement intent · Player, AI, script or recosource ·
· Who proposes the interaction intent · Player, AI crew, or mission script ·
· Who determines seat and mode qualifications · Seat relationships, interactive tasks and ability conditions ·
· Who saves weapon status · Character weapon or vehicle fixed weapon system ·
· Who interprets and performs actions · Character weapons, stationary weapons or turret actuators ·
· Who generates world results · Projectiles, physics, hit and damage systems ·
· Who confirms network status · Subsequent authority and replication path ·
For example, the driver can continue to submit vehicle motion intentions, the crew submits interaction intentions, the mission limits the turret angle, and the vehicle capability status denies actual launch; these results do not need to be uniformly owned by a “final controller”.
Interactive sources and lens feedback
Player input is only one source of in-vehicle combat. AI crews, scripted missions, and vehicle automatic weapons logic may also generate interaction requests. They need to fall into the same set of intentions and access paths, rather than each directly modifying the weapon. The network or playback can reuse this set of interaction contracts at a later stage, but it is not expanded into a new source of local intent in this article.
● Player source
Player sources typically provide:
- aiming direction;
- Locked or free aim state;
- Fire, sustained fire and release fire;
- Reloading, changing weapons and throwing intentions;
- View mode and lens assist status.
● AI source
AI crew members typically provide:
- target entity;
- shooting timing;
- Target priority;
- Weapon mode;
- Allowed shooting angles and distances.
● Script and task sources
Scripts can ask the vehicle to fire at a specific time, maintain turret orientation, deactivate the weapon, or wait for the animation to complete. The mission source may also impose conditions on firing, such as no friendly fire, having to wait for the target to enter the area, or only firing after the vehicle is stabilized.
These sources do not directly compete for the same weapons field. A more stable method is: the source submits the candidate intent, the current task and permission rules determine whether the candidate is valid, and the weapon actuator generates the final action based on the status.
● Lens feedback and interaction status
The in-car lens is responsible for both driving feedback and combat feedback. Driving shots need to show speed, steering, collision and body posture; combat shots need to show sights, targets, recoil, turret direction and hit feedback.
If each system could directly replace the camera, players would see the camera jump erratically between the driving perspective, the aiming perspective, the turret perspective, and the hit lens. A more stable structure is to let different systems submit lens requests, and then the lens coordination layer merges them according to the current mode and task constraints.
● Source of lens feedback
- Vehicle motion status;
- Current driver’s seat or weapons seat;
- Aiming mode;
- turret direction;
- Fire and recoil;
- Collision and damage;
- Mission scripts and cutscenes.
The camera reads these statuses but does not assume driving or weapons authority. The position of the crosshair in the lens cannot prove that the turret has completed its physical rotation, and lens vibration cannot replace the fact of collision.
Damage status limits the ability to fight in the vehicle
the previous installment Confirmed changes to vehicle capabilities will continue to impact in-car interactions. For vehicles with independent vehicle-mounted weapon component models, there may also be limited turret rotation capabilities or ammunition supply capabilities; whether these states are maintained separately by the original version needs to be continuously verified based on the writer and consumption path of the corresponding component. Engine or body state changes may also affect interactions indirectly through the vehicle capability set.
Different results of capacity constraints
- Engine limited: vehicle speed and route execution are affected, but the crew may still be able to aim;
- Turret rotation is limited: the target still exists and weapons may be available, but it is not reachable in the current direction;
- The vehicle body is seriously damaged: the crew may enter the attack or evacuation process;
- Weapon system failure: driving continues, weapon mission enters waiting or terminated;
- Driver failure: the vehicle motion control source needs to be redistributed, and the crew weapon status may not end simultaneously;
- Vehicle movement and stationary on-board weapons usually require waiting for the physical representation to become eligible for execution again; whether the crew-held weapon is paused also depends on the seat, character representation and current interaction mode.
Capability constraints should be communicated to in-vehicle combat missions through structured feedback. For example, “the current turret direction is unreachable”, “weapon system cooling is not completed”, “seating relationship is invalid”, “physical execution qualification is temporarily unavailable”, it is easier for the upper layer to handle it correctly than returning false uniformly.
Abnormal path and recovery
A complete system cannot just describe successful aiming, weapon firing, and hitting the target; the following failure paths also constitute runtime semantics:
● Target failed
The target service clears or degrades the target when it exits range, dies, hides, or enters an unattackable state. The weapon mission can maintain the search or end the current targeting, but does not directly declare the vehicle mission failed.
● Turret not ready
Weapons missions should wait while the turret assets, physics joints, or seat animations have not finished loading. Waiting does not mean that the weapon is damaged, nor does it mean that the mission is completed.
● Permission invalid
After the crew changes seats, gets off the vehicle, dies, or the mission is cancelled, the current shooting authority will become invalid. Existing launch requests need to be canceled or cleared to avoid continuing to submit weapon orders after the character has left the seat.
● Vehicle movement restricted
When a vehicle enters a loss of control, critical damage, or physical hold state, weapons missions may still preserve target and intent, but must determine whether to delay launch, restrict the turret, or end the current interaction based on execution qualifications.
● Weapon mission ends
Weapon changes, reload failures, script cancellations, objective completions, and crew exits may end the current weapon branch. At the end, the aiming target, lens request, animation status and turret temporary mark need to be cleaned up; the remote status to be submitted belongs to the processing scope of the subsequent synchronization system.
7. Source code reading and responsibility verification
A more reliable entry point for reading in-vehicle combat code is to observe visible behavior rather than search for eshooting function: the crew starts aiming while the vehicle remains moving, the turret is allowed to fire after it completes its initial adjustment, the search continues after the target is temporarily lost, the weapons branch terminates after the character leaves the seat, or the damage status limits the turret direction.
Along these lines, the following list of responsibilities can be established:
· Observed behavior · Possible levels of responsibility · Status to be checked ·
· — · — · — ·
· Vehicle maintains route and speed · Driving execution layer · Route, control source, physical feedback ·
· Player enters aiming state · Player weapon routing layer · Input, seat, weapon mode ·
· Target position is continuously updated · Target maintenance layer · Entity, offset, speed, failure ·
· Turret steering target · Vehicle-mounted weapon execution layer · Angle, speed, seat permissions ·
· The character’s body follows the turret · In-car action layer · Seats, animation network, posture ·
· Weapon launch · Weapon and physics interface · Admission, cooling, trajectory, impulse ·
· Restricted shooting after the vehicle is damaged · Ability status layer · Component status, execution qualification, reco ·
Task names in the source code can help with positioning, but they cannot replace responsibility analysis. One task may be just a router, another task may be a vehicle side executor; a weapon component may have target query, but not task termination; an animation task may reflect turret status, but not turret direction.
Source code evidence, architectural abstraction and migration inference
Three conclusions publicly expressed in this article need to be distinguished:
The first category is the fact that can be observed in the tracked vehicle state path: the player’s vehicle state will choose different branches such as driving, ordinary weapons, projectiles, and vehicle-mounted weapons; the vehicle side will be equipped with different players to drive and perform tasks according to the vehicle type; the turret action path will read the seat, target, and animation network states. The specific conclusion should still be returned to the task creation entry, branch conditions, status writing points and consumption path verification.
The second category is responsibility abstraction. For example, character-side entrances are summarized as state routers, various player driving tasks on the vehicle side are summarized as shared life cycles and type-specific executors, and target location maintenance is summarized as target services.
The third category is migration inference, such as establishing a parallel driving and interaction layer in the target engine, splitting the turret control into two layers: target direction and physical execution, and providing structured capability results for damage feedback. These are design suggestions derived from the mechanics and should not be written as the only possible form of the original implementation.
8. Timing, conflict and submission of parallel interactions
If the previous division of responsibilities only stays at the noun level, it can still be easily understood as “the vehicle has a driving system, and the weapon is equipped with a shooting system.” The actual runtime is closer to a continuous chain of events. An abstract scenario is used below to illustrate how these relationships are maintained over a period of time.
The vehicle drives along the urban road, and the driver maintains the current lane and approaches the intersection; the co-pilot finds the target in front of the side and enters the aiming state; the target service updates the target position according to the camera direction and vehicle attitude; the weapon task checks the seat permissions, ammunition and launch conditions; if the vehicle encounters a minor collision, the damage feedback described in the previous installment will change the vehicle’s execution qualifications, but does not necessarily cancel the weapons task. In this process, any state may change before other states.
For example, the crew has just finished aiming and the target disappears from behind a building. The target service first marks the target as temporarily invisible, and the weapon mission should not continue to fire indefinitely using the hit point of the previous frame, but should enter a brief hold, research, or cancel state according to the locking policy. At the same time, the vehicle can still proceed along the route and the driving actuator continues to consume driving commands. Target failure only affects the interaction branch and should not switch the entire vehicle to a stopped state.
Conversely, if the vehicle suddenly experiences a strong impact, the body posture, seating status, and weapon availability may change simultaneously. The physical system first generates collision facts, and the damage layer updates the confirmed vehicle status. When the vehicle is running, the results are converted into capability states such as “allowed to continue moving”, “restricted steering”, “temporarily prohibited from launching” or “entering out-of-control recovery”. Weapon tasks consume ability results instead of directly reading each collision field. This way, the damage system can change firing qualifications without needing to know the internal details of reticle, target service, and ballistic execution.
This scene contains four sets of possibly asynchronous advancement relationships:
- Vehicle movement continues to advance according to the current command window;
- Target services are promoted based on perception and query results;
- Weapon missions progress through aiming, loading and firing phases;
- Mission scripts advance by events and conditions.
They are not required to have the same update rhythm, nor do they share the same end condition. Driving missions may end by reaching the target or losing qualifications; aiming missions may end by target failure, player release input, or seat changes; scripted missions are advanced by event conditions. The respective command windows and end conditions are clear, and there is a parallel basis when running.
Three “continues” on the same car
“Continue driving”, “continue aiming” and “continue the mission” are not the same judgments. The vehicle may continue to move, but the current target is no longer attackable; the weapon can still be fired, but the mission has required the vehicle to leave the engagement area; the mission is still valid, but the damage status temporarily prohibits firing. Compressing these judgments into a master switch similar to CanContinue will cause local failures to spread to the entire vehicle.
A safer way is to split the ability into multiple consumable results: moving qualifications, turning qualifications, aiming qualifications, launching qualifications, seat changing qualifications and mission continuation qualifications. They can result from a common vehicle status but be interpreted by different consumers. Facts and capabilities are maintained while the vehicle is running, and specific tasks determine how those capabilities are used.
This split also explains why “weapon is equipped” is not directly equivalent to “weapon can be fired”. Equipment describes static relationships; launch also requires satisfying current seat, current mode, target status, cooldown, ammo, collision safety, script permissions, and vehicle component status. Each of these may be undone at different stages, so firing must be a conditionally confirmed commit rather than invoking an unconditional action on the weapon object.
Conflict and responsibility in parallel interactions
The most likely problem in a parallel system is not the normal state, but multiple consumers making conflicting requests at the same time. There are at least three types of conflicts in in-vehicle combat: spatial conflicts, control conflicts and semantic conflicts.
● Space conflict: seats and weapons occupy the same set of relationships
To use a lateral weapon, the crew must first occupy a seat that allows the weapon to operate; the turret operator needs to obtain turret control authority; and the driver needs to retain the driver’s seat relationship. Seating relationships therefore not only determine where characters are attached, but also determine which interaction channels can be established.
Weapon missions should not automatically infer that the seat has been disabled when a crew member changes seats, is knocked down, or performs an exit maneuver. A more reliable path is to post status changes by seat relationship, weapon assignment subscription or query current eligibility and reconfirm before next submission. In this way, the seating system is still the relationship owner and the weapon system is just the relationship consumer.
● Control conflict: player input and task constraints exist at the same time
The player may be holding down the fire button, but the mission script is asking the vehicle to drive away from the area; the player may be trying to turn the turret, but the turret is in the initial alignment or remount animation; the AI crew may have an auto-fire strategy, and the player is switching control modes. “Last writer overwrites previous value” does not resolve this type of conflict, because write order only reflects chronological order, not responsibilities and permissions.
Conflicts need to be resolved between command formation and mission clearance. The input layer can record player intentions, the target layer can provide attackable objects, the task layer can provide restrictions, and the weapon execution layer can generate executable requests based on the current mode. When a request is rejected, the original input does not have to be pretended not to exist; it can remain as an input, wait for re-evaluation when the condition is restored, or be explicitly cleared on a mode switch.
● Semantic conflict: the same action has different meanings in different modes
“Pressing the attack button” may mean normal fire, vehicle-mounted weapon fire, turret fire, projectile release, or mission-specific action. If the input system sent hard-coded events directly to each weapon, mode changes would branch out a lot, and it would be difficult to tell who owns the current move.
A more stable approach is to let the upper layer submit mode-independent action intentions, and then choose the interpretation path based on the current weapon mode, seating relationship, and vehicle type. The intent layer is not responsible for determining muzzle position, turret angle, or trajectory; the execution layer does not reread the entire set of player inputs. There needs to be a contract that is small enough and clear enough between the two.
● Responsibility for conflict handling
Conflict handling can be divided into three levels:
The first level confirms “who is qualified to make the request”, mainly related to seats, control sources and mission status; the second level confirms “whether the request makes sense in the current mode”, mainly related to the target, weapon mode and script constraints; the third level confirms “whether the request can be executed”, mainly related to component status, cooling, ammunition and physical limitations. Each layer can only reject or modify the part it is responsible for, and cannot skip levels to reconstruct the status of the entire vehicle.
This is especially important for debugging. If the vehicle is still moving but the weapon is not firing, it should be possible to distinguish whether the player has not been granted weapon command submission rights, the targeting service has not provided a valid target, the weapon mode has refused to fire, the turret has not yet completed alignment, or the damage system has revoked execution. A general “attack failed” state cannot bear such a diagnostic task.
Life cycle of vehicle-mounted weapons: from interaction to submission
In-vehicle combat cannot be reduced to “aim and call fire.” From a runtime perspective, there are at least several stages with different owners: interaction request establishment, weapon mode confirmation, target information update, aiming attitude convergence, execution qualification confirmation, launch submission and result feedback.
When an interaction request is established, the system needs to confirm whether the player or AI is operating an allowed seat, and whether the current vehicle mode accepts such requests. When confirming the weapon mode, you need to decide whether you are currently using normal crew weapons, fixed vehicle-mounted weapons or turret systems. When target information is updated, the target service provides direction, position, speed, or lock status. When the aiming pose converges, animation or physics actuators convert the target direction to the desired pose for the character, weapon hardpoint, or turret.
A final inspection is required before launch submission. The target may have been disabled since the last query cycle, the seat may have changed, the vehicle may have entered a damage state that prohibits firing, and the turret may not be able to reach the target direction due to physical constraints. This check is not a double calculation, but prevents asynchronous state from causing incorrect submission in the last step. After the launch is submitted successfully, the results are returned to consumers such as ammunition, damage, sound effects, shots, and mission events.
● Separation of aiming state and launching state
Aiming can persist without firing. Players may adjust the crosshair, wait for a target to come into view, wait for the turret to complete its turn, or use the aiming state to trigger camera and animation feedback. A launch is a discrete commit, subject to cooldown, resource, and licensing constraints. Combining the two forces the system to use “aiming” as an approximation of “can fire”, which can end up with weapons firing early, using the old direction after the target changes, or losing input when the turret is not ready yet.
When reading the source code, if you can observe that target updates, aiming postures and launch tasks each have their own state advancement, they should not be re-abstracted into a “combat controller”. They are strongly related, but the responsibilities are still different. When the article is expressed publicly, it can be described as “aiming chain”, “launch chain” and “feedback chain” without exposing the specific implementation class name.
● Submission semantics of vehicle-mounted weapons
“Fire” in vehicle combat cannot be expressed with just a Boolean state. In order to distinguish input edges, persistent states, execution qualifications and irreversible results, this article adopts four responsibility stages:

Fire Intent can come from a single press, a sustained hold, or the AI’s firing strategy; it describes the source’s desire. Fire Request is a request organized by the current mode and target context, and may still be rejected by seats, damage, cooldown or turret status. Fire Commit is entered only after the actuator returns acceptance. Irreversible consequences, such as ammo consumption, projectile creation, and mission events, should be consistent with submission.
This distinction also applies to fixed weapons and turrets. When the turret has not completed the initial adjustment, you can keep Fire Intent or discard it under the mode rules; but you cannot delay the expired input event indefinitely until it is automatically reissued after the turret is in place. Continuous fire is re-evaluated in each command window, and the release event is responsible for closing the current persistent request.
· Input form · Semantics · Suitable life cycle · Whether consumption can continue after delay ·
· — · — · — · — ·
· Press to fire · Edge event · Generate an interaction intent · Only within a short valid window ·
· Continuous fire · Continuous state · Keep repeating the request’s intent · Re-evaluate after conditions are restored ·
· Release fire · End event · Close current ongoing request · Cannot be used as a new fire request ·
· Charged Throw · Stage Status · Start, Hold, and Release Confirmed Separately · Check the Source and Qualification at Each Stage ·
· Reload or change weapons · Quest request · Advanced by the corresponding task · Determined by the task whether to queue or cancel ·
This distinction avoids two opposite problems: storing a press event for too long, causing a subsequent shot to be fired after the turret completes its turn; or treating sustained fire as a single event, preventing automatic weapons from continuing to evaluate when conditions return. The input layer stores the source intent, the weapon task determines whether the intent can be converted into a request, and the executor determines whether the request can enter the submission stage.
● The results of vehicle-mounted weapons include more than just damage
A single submission may produce multiple results: trajectory or projectile creation, muzzle and hardpoint correction, ammunition consumption, recoil or vehicle disturbance, camera feedback, audio feedback, target hit events, and mission events. They are not necessarily done by the same object or in the same frame. The weapon task proposes an intent and organizes the request, the actuator returns an acceptance or rejection, and the specific result is produced by the corresponding actuator and physical system.
This is also the reason why “weapon mission is not equal to weapon physics”. The task is responsible for when to allow submission, what mode to select, and what state to maintain; the executor is responsible for how to generate projectiles, how to apply direction, and how to accept physical feedback. Mixing the two can reduce the number of interfaces in the short term, but in the long term will cause the task status and physical status to overlap each other.
● Three seams between turrets, animation and physics
Fixed vehicle-mounted weapons and turret systems would further amplify the concurrency problem. The turret has visible rotational movements, as well as target direction and physical constraints; the character may also need to maintain a posture in the seat; weapon firing requires the muzzle direction to be consistent with the target state. One “turret angle” field cannot represent both of these levels.
The animation layer focuses on the visible poses of characters and parts. It may require streaming to load action assets, completing initial alignment, entering a sustained turn, handling steering transitions, and returning to normal pose at the end. The animation layer can temporarily prevent the launch, or provide a “stance ready” status to the weapon layer, but should not directly determine whether the target is effective.
The target and weapon layer focuses on interaction semantics: whether there is currently an attack target, whether locking is allowed, whether it can be fired, and whether a shot has been completed. It needs to know the current effective orientation of the turret, but it doesn’t have to manage the loading state of the animation assets.
The turret execution or joint layer focuses on rotation, constraints, collisions and feedback of real parts. It may be driven by physical joints, kinematic components, animations and bones, or a combination of hybrid constraints. If the source code only reflects angle, speed, limit and feedback, it is not enough to further assert that there must be a complete physical turret implementation. After this layer rejects a request in a certain direction, it should return consumable capability feedback instead of directly clearing all target states of the upper-layer tasks.
This seam can be identified by three questions when reading the source code: who updates the visible pose of the character or turret, who maintains the target and launch status, and who writes the actual rotation or physics part. If three answers fall into different state advancement logics, the boundaries between them should be preserved. This way, when migrating to other engines, animations, targets, and physics implementations can be replaced individually without having to redesign the entire lifecycle of in-vehicle combat.
Abnormal life cycle: target, turret, seat and vehicle capability changes
In the open world, abnormal states will appear frequently: the target is blocked, the crew changes seats, the weapon resources have not been loaded, the vehicle is impacted, the mission is interrupted, or the driver suddenly loses control. In-vehicle combat needs to treat these situations as part of the normal life cycle, rather than just remediating them during the testing phase.
● The target disappears briefly
The disappearance of the target does not mean that the target is permanently invalid. The target service needs to distinguish between being temporarily invisible, out of query range, occluded, and the entity has been destroyed. Weapons missions can be kept recent, reacquire targets, or terminate immediately depending on the mode selection. Different results will affect the crosshair, camera, turret, and mission events, but should not affect the driving cycle of the vehicle itself.
● Turret is not ready yet
The turret may be loading action assets, completing initial alignment, waiting for physics parts to be restored, or being in steering limits. At this time, the target still exists and player input is still valid, but the launch qualification is temporarily closed. Input can be retained as the current intent, or discarded depending on the weapon mode; the key is that the system must make this choice clear and not interpret a “not fired” error as “no input from the player.”
● The passenger was forced to leave his seat
After the seat relationship is changed, both target services and weapon tasks need to stop consuming the original seat permissions. If the character falls to the ground, jumps out of a car, or is in a task transfer state, the system should first revoke the interaction qualification and then process the animation and performance to prevent the next frame from still being submitted and launched through the old reference. The vehicle driving state can continue or enter the pause or resume path specified by the task; the two should not unconditionally destroy each other due to seat changes.
● The vehicle enters a non-combatable state
Damage or mission rules may prohibit weapons use but still allow vehicle movement; they may also limit steering, speed, and crew interaction. At this time, the ability collection should be updated instead of directly deleting the weapon task object. After capabilities are restored, whether a task is reactivated depends on its life cycle and recostrategy. Preserving task state avoids rebuilding target, camera, and animation relationships etime a brief failure occurs.
Source code evidence: creation, update, consumption and end
Source code analysis of in-car combat is easily attracted by a single name. Seeing that a function contains Fire, Aim, or Turret does not prove that it owns the entire combat system. A more reliable approach is to trace along four categories of evidence: creation, update, consumption, and end.
Create evidence to answer “who installed this task or state under what conditions”; update evidence to answer “in which cycle the state was advanced”; consumption evidence to answer “who read the goal, permission or capability result”; end evidence to answer “why the task was stopped, resumed or handed over to the next source”. If you only find creation but no updates, it’s probably just the wrapper layer; if you only find launch calls without target and permission checks, it’s probably just the executor; if you only find animation states but no weapon submission, it’s probably just the performance subtask.
Also need to log the status writer, not just the field name. Who writes the target position, who writes the turret angle, who revokes firing qualifications, who broadcasts seat changes, and who converts vehicle damage into capability limits, these questions speak volumes about ownership better than the class name. For anonymized public articles, it is also safer to use the responsibility name instead of the concrete class name, because what the reader actually needs is the relational structure, not the private symbol table.
● Source code facts, architectural abstraction and migration inference
The behavior directly reflected in the source code can be expressed by “can be observed from the calling relationship” and “the state is updated by a certain side”; the summary of cross-function and cross-module responsibilities should be expressed by “can be abstracted as” and “shows a layer”; migration suggestions for UE5 or other target engines should be clearly marked as “migration inspiration” and cannot be written back as original implementation facts.
In particular, avoid referring to structures that are “suitable for migration” as “must be so in the original version.” For example, player state routing, vehicle interaction bridging, and type-specific executors are valuable target architectural abstractions, but they are not equivalent to the existence of interfaces of the same name in the original code. The credibility of an article comes from the layering of evidence and inference, not from stronger assertions.
● Request snapshot and expiration check
A lot of the problems with in-vehicle combat happen between “query” and “submit”. The target still exists when the target service is queried, and the seating relationship has changed when the weapon mission is ready to be launched; the vehicle is still in a combatable state when the turret begins to turn, and the damage system has revoked the execution qualification when the launch is actually submitted. If the system only checks the condition once at the beginning of the interaction, asynchronous updates can cause old results to cross new state boundaries.
Therefore, issuing a request requires a sufficiently small validity snapshot. It does not have to copy the entire vehicle object, but only needs to describe the context of this request: interaction source, seating relationship, weapon mode, target facts, vehicle capabilities, and interaction generation. The snapshot is compared to the current state at commit time, and any key context changes can reject old requests and trigger a requery. The “version” here refers to the organization method in the migration design and should not be reversed to mean that the exact same set of fields already exists in the source code.
It is important that the interaction request cannot just carry a Boolean value of “I want to fire”, but must be able to answer: to which control source does this request belong, for which target, and under what seating relationship and vehicle capabilities is generated. Otherwise, delayed return targets, repeatedly consumed inputs, and expired task states will all be mistaken for current facts.
● Control source changes must have a traceable commit sequence number
The vehicle may experience a continuous handover of AI driving, player driving, scripted actions, and recotasks while moving. In-vehicle combat will also undergo similar changes: the player takes over the weapon, the mission temporarily locks the weapon, the crew automatically fires, and the script forces the interaction to stop. Interactive generations can be used to invalidate late requests to old sources of control; the emphasis here is on lifecycle semantics rather than asserting that the source code adopts a specific field.
A reliable interaction state needs to distinguish at least the current control source, the current command window, the current interaction generation and the last accepted submission sequence number. When a source of control is released, all target and performance states do not have to be destroyed immediately, but old commits must be invalidated. After a new control source is established, the system can either inherit the target context that allows inheritance, or it can require the targeting state to be re-established; this depends on the interaction mode and is not determined by a common task default.
This is consistent with P4’s control source handover: what is released is the submission qualification, and what is retained or cleared is the state content. When the player temporarily releases the fire input, the target relationship does not have to be deleted; when the mission temporarily takes over, the old player input must also become invalid. Retention, invalidation, and recoof interaction state need to be modeled separately.
● Input snapshot, target snapshot and physical feedback are not the same kind of data
The input snapshot describes “what the current source wants to do”; the target snapshot describes “what the current interaction is for”; and the physics feedback describes “what is actually happening in the world”. The three may contradict each other in a frame: the player wants to continue firing, the target has been disabled, and the physics layer reports that the turret is limited. The system cannot use any one item to overwrite the other two items.
The input snapshot can continue to exist, waiting for the next condition confirmation; the target snapshot needs to be re-queried after expiration; the physical feedback must enter the capability evaluation to decide whether the request should be postponed, rejected, or converted to another executable state. Writing physics feedback directly back to the input will cause the player’s intention to be lost; writing input directly back to physics will cause the failure state to be overwritten; treating the target snapshot as a permanent fact will cause the problem of firing on expired targets.
For source code readers, this provides a practical way to tell: if a state structure holds player input, target entities, turret attitude, and physics results at the same time, further confirmation is needed to confirm whether it is a temporary aggregate snapshot, or whether it has mistakenly assumed multiple owners. A short-lived request object can aggregate this information for a single submission; but the persistent system should still have separate facts.
Implementation errors that can be avoided by the multi-consumer model
The value of architectural abstraction is not just in explaining existing code, but also in its ability to predict errors. The following types of common failures can all be explained by the destruction of responsibility boundaries.
● Fault 1: Driving input is captured by weapon mode
If all inputs within the vehicle first go into the weapons task, which then determines whether to be forwarded to the driving system, then aiming, loading, or firing status may erroneously alter vehicle motion. A more serious situation is that the driving consumer is not restored at the end of the weapon mission, causing the vehicle to maintain the speed or direction of the previous frame, which is manifested as input failure.
The correct responsibility relationship should be: the input route generates multiple consumable intentions based on the current role state; the driving consumer consumes movement-related intentions; the interactive consumer consumes aiming and firing-related intentions. The two can share input snapshots, but do not share each other’s lifecycle. An interaction mode’s exclusive ownership of the aiming input does not mean that it has ownership of the throttle, brakes, or vehicle route.
● Fault 2: The camera turns to directly change the direction of the turret
In first-person or over-the-shoulder view, camera direction typically affects aiming direction, but the camera itself also takes on vehicle motion feedback, collision feedback, seat perspective, and performance transitions. If the weapon directly reads the final camera rotation and writes it to the turret, camera scripts, vehicle attitude corrections, or vibrations may be misinterpreted as player aiming intent.
A more stable link is to first obtain the logical aiming intention from the control view, and then combine the vehicle coordinates, seat points, target query and turret constraints to generate the weapon direction. Lenses can consume the same directional results for feedback, but should not be the only source of authority. This way, camera cuts or cutscenes can change the performance without inadvertently driving physical turrets.
● Fault 3: Still firing when the turret is not in place
If the target service provides a target point, the weapon task calls the launch executor directly, and the initial turret adjustment and physical steering are treated as asynchronous details. The result is that the muzzle is not visually aligned, but the trajectory is generated from the target direction; or the physical component refuses to turn, but the weapon mission has deducted ammunition.
This type of error requires the launch submission to have an explicit “attitude ready” condition. It is only a necessary condition that the target is valid. The direction is reachable, the components are available, the current permissions are valid and the launch resources are sufficient. After the executor rejects, ammunition consumption and task events should follow the submission order, and irreversible results cannot be written in advance before the execution fails.
● Fault 4: The entire vehicle task is cleared after the vehicle is damaged
After the vehicle is impacted, if damage processing directly destroys all tasks in the vehicle, the driving, aiming and task scripts will lose their status at the same time. Players may experience a minor collision and be forced to re-establish seating, targeting, and weapon modes; or the vehicle may be able to resume movement, but in-car interaction never returns.
A more reasonable approach is to limit the vehicle status generation capability and then explain it to each consumer. Slight damage may only affect the launch stability, moderate damage may limit the turret angle, and severe damage will terminate the vehicle-mounted weapons mission. Whether the driving mission continues, whether the target is retained, and whether the camera is switched should all be handled according to their respective recorules.
● Fault 5: Weapons remain on the old character after leaving the car
Exiting the vehicle involves seat release, control source shutdown, lens relocation, and mission recovery. If the weapon task only checks the seating relationship during the firing phase without clearing the submission rights at the end of the interaction life cycle, it is possible that the character can still submit shots to the old vehicle after leaving the vehicle, or receive the remaining target status of the previous interaction after re-entering the vehicle.
Seating relationship versions and interaction generations can be used to prevent such late requests. It is not necessary to destroy all presentation objects when leaving the car, but the old control window must be closed; upon re-entering, a new interaction submission context should be established based on the new seating relationship and mode.
Unified explanation of different in-car interaction forms
There’s not just one form of in-car interaction. Crew side firing, roof-mounted weapons, turret operations, projectiles, on-vehicle weapons, and mission script operations vary greatly in performance but can be analyzed using the same set of questions.
First, who initiates the interaction? Is it the driver, crew, AI character, mission script, or the vehicle’s own automatic logic. Second, to which relationship is the request bound? Is it character and seat, character and weapon, or vehicle and fixed parts. Third, what target information is required for the request? Constraints are different for free aim, locked target, waypoint, and scripted position. Fourth, who will ultimately execute it? Be it character actions, normal weapons, stationary weapons, turret physical parts, or special projectiles. Fifth, what to keep after failure? Inputs, objectives, missions, ammo, and performance status are not necessarily cleared at the same time.
Using this set of questions to analyze different interactions avoids the tendency to “plug all the weapons into the vehicle controller.” What is shared is the interaction life cycle and qualification checks, and what is specific is the goal interpretation, posture constraints and execution methods. Crew weapons on cars don’t need a ship’s buoyancy model, nor should turrets replicate the arm targeting logic of normal character weapons; but they both need to handle sources, targets, permissions, execution, and feedback.
● Crew shot sideways
The core constraint for this type of interaction is the role-seat relationship. The character’s movements need to maintain a relative relationship with the car body, doors, windows and seat attachment points, and the direction of the weapon is also affected by the body movement and line of sight. The vehicle can continue to be driven, and the crew’s actions and shooting tasks progress in parallel inside the vehicle.
Its execution results are usually completed by ordinary weapon chains, and the vehicle only provides position, attitude, occlusion and motion feedback. Therefore, crew weapons cannot be directly classified into vehicle driving tasks; driving tasks only need to provide body status and related capabilities, and the weapon chain still maintains its own aiming and firing life cycle.
● Fixed vehicle weapons
Fixed weapons have a stronger physical relationship with vehicles, and weapon hardpoints, vehicle orientation, and vehicle damage may all affect firing eligibility. The player or AI provides the interaction intent, and the on-board weapon actuator is responsible for interpreting it into direction and firing actions on the fixed hardpoint.
Fixed weapons do not necessarily require separate turrets, but still require clear seams between target services, weapon modes and vehicle components. Especially when parts of a vehicle are damaged, weapons on one side may become disabled while the entire vehicle is still able to move or use other interactions.
● Turrets and rotatable parts
The turret adds a continuous attitude convergence process. The target direction does not change into a physical angle instantly. The turret needs to deal with rotation speed, limit, initial alignment, component relationships and collision constraints. Character movements may also need to show the operation process, but the animation does not have the final direction of the real turret.
Therefore, the turret scene best reflects the core of this article: driving, targeting, animation, weapons and physics each have their own local state, and the vehicle is responsible for maintaining their relationship when running, rather than merging everything into one big task.
Engineering migration inspiration: preserve relationships first, then implement performance
Although this article does not go into the UE5 implementation article, reading the source code can give you the migration sequence. The first step is not to model the turret or rig the inputs, but to determine the relationship between seats, control sources, targets, weapon modes and vehicle capabilities. The second step is to establish observable state changes, so that “why there is no launch”, “why the turret does not rotate” and “why the driving continues” can be answered respectively. The third step is to connect animation, lenses and physical performance.
The most common mistake when migrating is to first create a “vehicle combat component” and put all the input, aiming, turret and shooting code into it. This will give you quick results, but it will cause vehicle driving, character weapons and vehicle-mounted weapons to share an undivided life cycle. When AI, script control and damage status are subsequently added, a large number of overlapping conditions will appear within the components.
A safer goal is to keep four boundaries: the vehicle is running to provide persistent state and capabilities; the character or player route provides the source of interaction; the target service provides target facts; and the weapon and turret actuators are responsible for interpretation and submission. Camera, animation, audio, and task events consume results outside the boundary. This structure does not require duplication of the class hierarchy of the original source code, but can preserve the distribution of responsibilities observed in reading the source code.
Migration verification should also start with abnormal scenarios, rather than just testing “projectiles are generated after pressing the fire button”. At least it needs to be verified: whether aiming is maintained during driving; whether driving can be continued after the target is disabled; whether firing is refused when the turret is not ready; whether damage limitation only affects relevant capabilities; whether old requests are invalidated after changing seats; whether AI or missions can be restored after leaving the vehicle; whether a new interaction generation is established after re-entering. It’s only through these scenes that in-vehicle combat truly becomes part of the open-world vehicle runtime.
The boundary between the previous and previous chapters
the previous installment focuses on collision, injury, loss of control and recovery. This article reads the the previous installment’s ability change results and explains how these results limit aiming, weapons, and in-vehicle actions; it does not reopen the damage attribution and recostate machines.
This article does not discuss the dynamic control of pursuit and escape. Vehicle chases may change driving goals, attack rules, multiplayer coordination and strategy choices, which are core issues in the next article.
This article does not cover network synchronization and playback protocols. They are retained only at the boundary: local interaction intent does not equal authoritative results, and expired requests need to be able to be rejected; specific cloning, replays, vistas, and multi-vehicle continuation are left to the end of the series.
Therefore, the current series of chains can be organized as:

Conclusion: The battle in the car is to add a set of constrained control consumers
Driving, aiming, and in-vehicle combat can coexist, relying not on a larger vehicle controller, but on the maintenance of responsibility boundaries: the driving task continues to maintain vehicle movement, the in-vehicle interaction task maintains crew and weapon status, the target service maintains targetable objects, the turret actuator interprets direction and physical constraints, and the lens and presentation layer consume status feedback.
The vehicle can therefore maintain the same identity between continuous movement, limited damage, target changes and crew interactions. In-vehicle combat does not automatically gain control of the entire vehicle; it can only submit interaction requests within its own scope when the seat, mission, target, weapon, and physical qualifications are met.
The core of in-vehicle combat is not to let the crew fire in the vehicle, but to keep driving, aiming and weapon execution in parallel on the same continuously running vehicle without overstepping each other’s authority.
AI collaborative review
The AI collaboration in this article is mainly used to organize the source code reading notes of vehicle player control, seat weapons, turret actions, target services, and in-vehicle tasks, and map them to the responsibility chain of “driving execution—interaction routing—target maintenance—weapon execution—physical feedback”.
There are three types of deviations that are most likely to occur in the first draft of AI: mistakenly writing in-vehicle combat as a replacement for driving tasks; writing target location services as weapon actuators; and compressing turret animation, turret physics, and weapon launch into one controller. During manual review, check one by one according to the task creation location, status update stage, field writer and end condition, and separate the source code facts, architectural abstraction and migration suggestions.
This article has not yet entered the UE5 implementation chapter and does not expand on specific components, interfaces or physical APIs. Subsequent implementation articles will establish a verifiable parallel control prototype based on these responsibility boundaries.