githubEdit

"Killed Unit Position" Pin in On AI Unit Killed Node is Scaled 10x Smaller

The Killed Unit Position pin in the On AI Unit Killed node outputs coordinates that are 10x smaller than standard Forge coordinates.

Cover image

In Halo Infinite Forge scripting, the On AI Unit Killed node is used to trigger events when an AI unit dies. However, the positional data provided by this node does not align with the standard coordinate system used by other Forge nodes.

Scaling Behavior of On AI Unit Killed

The Killed Unit Position pin within the On AI Unit Killed node outputs a Vector3 that is 10x smaller than the actual position used by Forge. If this vector is used directly to place objects, spawn effects, or set variables, the resulting position will be significantly offset from the actual death location.

Correcting the Position Output

To obtain the correct coordinates, the output from the Killed Unit Position pin must be passed through a math node to restore its proper scale.

Required Node Setup

The standard workflow to correct this discrepancy involves using the Scale Vector node. The Killed Unit Position pin should be connected to the Vector input of a Scale Vector node, with the Scalar input set to 10.00. The Result of the Scale Vector node can then be used for accurate positioning in subsequent logic.

Scripting graph showing scale correction
The scripting graph demonstrates connecting the `On AI Unit Killed` node to a `Scale Vector` node with a scalar of 10.00 to correct the death position.

Visual Representation of the Discrepancy

The difference between the raw output and the corrected position is clearly visible when comparing debug values or observing the physical placement of scripted elements.

In-game debug view
Debug text in the game view displays the difference between a scaled and unscaled death position.
circle-exclamation

Source Data

Contributors

Okom

Last updated