Code Structure Explained

Understand the logic behind the AC_ProNav component, allowing you to modify the code.

Core Logic

On each tick, the component will measure the location of its owner and the target. This data is then used to calculate the Commanded Acceleration.

In the next step, all enabled special behaviors will be applied.

Once this is done, the component will calculate a new pursuer (projectile) velocity. This new velocity will always maintain the same magnitude (speed) - it will only rotate the velocity vector.

Finally, some variables are saved to be used in calculations in the next tick.

Updating the target location

Let's say you have a large spaceship actor and want the missile to home in on a specific part of the ship - the ship's booster.

On the AC_ProNav component, open the function "Calculate ProNav Variables". At the very first section, we save the "Target Location" using a simple "Get Actor Location" call.

You would only need to update this specific part of the component to home into a specific part of the actor. In our example, we would add code that returns the ship's booster location instead of using the "Get Actor Location" node.

Manually Interpreting the Projectile's Velocity

If you wish to interpret to the velocity calculated by the AC_ProNav component in a separate blueprint, I recommend using the function provided on the BP_ProNavMissile blueprint (see Event Tick).

You might want to do this when using a higher tick interval (see Flight Path Customization -> Auto Interp Velocity).

Last updated