Hi Epics, why we have no DotProduct function in FVector4 ? And no operator |. Recently tried to use fmath for some interesting math calculations and got this WTF moment.
I see FVector have some Dot3 and Dot4 functions, but their semantics is kinda strange, and i cannot use them from my code for some reason.
I’ve entered a feature request to include a DotProject function for FVector4 (UE-26515). For the time being it would be possible to write a dotproduct function in the form of:
Because we wanted to make it clear whether it was using 3 or 4 elements of the FVector4, we have the Dot3 and Dot4 methods on FVector4. Those are the ones you should use, I think adding an additional DotProduct function would be confusing. I’m not sure why those are not usable in your code e.g.: