Lyra: A bitwise OR with two FVectors? What does it do?

const FVector WeaponLoc = GetWeaponTargetingSourceLocation();
CamLoc = FocalLoc + (((WeaponLoc - FocalLoc) | AimDir) * AimDir);
FocalLoc = CamLoc + (AimDir * FocalDistance);

What’s happening in the statement where: WeaponLoc - FocalLoc | AimDir? It looks like a bitwise OR being applied to two FVectors. I found it in LyraGameplayAbility_RangedWeapon.cpp from the UE5 Lyra Framework.

Hi wha092686,

The FVector overloads the | operator to return a dot product.

You can see all the overloads at the bottom of this page:

Hi RecourseDesign,

Continue being awesome, my friend.