Math Operand >> For Vector/Rotation

Hey there!

I spent the last days porting over some old code from UnrealScript and noticed a issue:

For a Weapon Sway function i used the Operand “>>” to calculate Rotation at a Vector Offset looking like this:

WeaponLoction -= WeaponOffset;
WeaponOffset = WeaponOffset >> CurrentSwayRotation;

The problem i am facing now is that the Operand is unknown in C++, i tried looking around the docs but could not find anything like this.

Any idea? I am already looking into rewriting this function, however keeping it would save me time.

By calculate rotation at a vector Offset, do you mean you want to know the rotation the vector Offset is pointing in, or you want to rotate the vector Offset by CurrentSwayRotation?

You can use Offset.Rotation() for the first one, or CurrentSwayRotation.RotateVector(Offset) for the second one. Does that help?

The second part gets it, thanks for helping!

I was not aware of some functions, but it seems to do the trick :slight_smile: