Download

[POSSIBLE BUG] ~ Power node doesn't affect sign

I’m new to these forums and I havent seen a bugs reporting section, so…

Yesterday I was building a material that would make grass displace when the player walks through it, but something was working very oddly when the player was approaching from world coordinates smaller than the grass’s (subtraction between the two resulting in negative numbers).
I started narrowing down the source of the issue and I discovered it had to do with the [Power] node: when you multiply two negative numbers, the result should be a positive one; which is not what happens when you feed a negative number into the Power node while the power is an even value.

My workaround was replacing the power nodes with multiply nodes which had the same value for both inputs (I just needed a power of 2).

UE4 ver.: 4.20.2