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

**URL:** <https://forums.unrealengine.com/t/lyra-a-bitwise-or-with-two-fvectors-what-does-it-do/545230>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, CPP, question\
**Created:** [April 30, 2022, 11:49pm UTC](https://forums.unrealengine.com/t/lyra-a-bitwise-or-with-two-fvectors-what-does-it-do/545230 "2022-04-30T23:49:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wha092686](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wha092686/32/1092108_2.png) [@wha092686](https://forums.unrealengine.com/u/wha092686)\
**Post date:** [April 30, 2022, 11:49pm UTC](https://forums.unrealengine.com/t/lyra-a-bitwise-or-with-two-fvectors-what-does-it-do/545230/1 "2022-04-30T23:49:26Z")

</div>

```auto
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.

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [April 30, 2022, 11:57pm UTC](https://forums.unrealengine.com/t/lyra-a-bitwise-or-with-two-fvectors-what-does-it-do/545230/2 "2022-04-30T23:57:37Z")

</div>

Hi wha092686,

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

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

> **[FVector](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/Math/FVector/)**
>
> A vector in 3-D space composed of components (X, Y, Z) with floating point precision.

---

<div class="post-metadata">

**Author:** ![wha092686](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wha092686/32/1092108_2.png) [@wha092686](https://forums.unrealengine.com/u/wha092686)\
**Post date:** [May 1, 2022, 12:08am UTC](https://forums.unrealengine.com/t/lyra-a-bitwise-or-with-two-fvectors-what-does-it-do/545230/3 "2022-05-01T00:08:04Z")

</div>

Hi RecourseDesign,

Continue being awesome, my friend.
