How to turn this calculation into a function?

How to turn this calculation into a function please?
img_print_06

I’m trying but is wrong, see:

1 Like

Not sure if I’m missing something, but your blueprint code is not the same as your C++ code. Your X value is not negated, and you return a vector with X Y and Z, instead of -Z, X, Y. If the C++ code is correct, you can always make it a blueprint callable function and use it in blueprints, there is no need to convert it to BP code.

1 Like