[Feature Request] FVector::GetAbs node for blueprint

Hi there. Doing some calculations for impacting objects and noticed that this function isn’t exposed to Blueprint. You can work around it by just splitting the FVector into floats and doing an absolute operation on each part individually, but it would be easier if there was an FVector::GetAbs node itself.

Its a small thing, but it would speed up workflow for calculating the magnitude of vectors.

So you dont need the Length of the vector, you just want to force all its components to be positive numbers?

That’s correct. Unusual, but it comes up a couple of times in a piece of code I have which is used to compare the player’s velocity to a normal direction. Its just one of those functions that exists in C++, but not in blueprint.

Well I guess until the feature comes you can always make a macro or an interface function (maybe even a whole function library) although i dont know how to add input pins/params to interface functions)

Thanks, for now I’m going to try that custom math function.

I was able to work around the issue by creating a custom math function. I’m not aware of a way to take a vector as an input and then manipulate each element individually within a math expression node, nor does the math expression node support absolute operations on a vector either, but you can split the struct into the three floats, take them as separate inputs into the math function, and then recombine them into a vector struct using the vec() operation. The expression is:

vec((abs(x)), (abs(y)), (abs(z)))

248915-vecabs.jpg