Hello everyone, I am developing a puzzle game on UE4 as my first game.
There are statues in the game that the player can rotate, in my blueprint I used timeline to rotate the statue 90 degrees if the player click on it, everything is working great, but the issue is after rotating the statue the Z value of the statue will be 89.999992 instead of 90.
The same thing happens when you manually rotate an actor in your scene as well. So it’s not due to an error in your code or anything, it’s about decimal precision. You can try fixing this by adding an additional logic to your existing rotation code, like rounding it’s world rotation if it’s not already.
Hey there @P-LoThRiC! I agree with @VisAgilis, where you could round the value or alternatively you could compare with Nearly Equal with an error range.