Will this code work to fire if an enemy is not moving?

Help me @Everynone Kenobi, you are my only hope.

The length of a vector will never be less than 0 here. I think you are confusing the length, in this case representing speed, with the direction of the velocity. In no cases, the false pin should execute. Perhaps it will even glitch on float precision.

what you need to check is if the vector length is almost equal to 0,

Nearly Equal (float) | Unreal Engine Documentation

if so, an enemy is not moving (based on that vector from the movement component).
The branch will then execute the True pin.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.