BUG: >= (Greater than or Equal to)

Preview 4
There seems to be a bug regarding the >=(Greater than or Equal to) option in blueprint as it seems to be acting like > (greater than) instead.
I was attempting to reproduce the inventory tutorial from Unreal’s youtube page, but i noticed that for some reason the energy seemed to not preform the jump action despite there being enough value for one final jump.
In the top left, you can see using the print string that that every press is only subtracting .05 while the default value (can be seen mid left most) is set to 1.0.
I cleared the node and replaced it with another >= but the result didn’t change.
I changed the Value to be >= to .0499 and it worked

Hi jail29,

Thank you for the report. I was able to reproduce the issue and I have created JIRA UE-16679. Our developers will be investigating the issue further and we will post back here with updates as we have them.

Another workaround would be to use whole numbers instead. The issue only seems to effect values lower than 1.

Cheers,

TJ

I see but the issue for this is that I had been using a simple version in which it would take the percentage of the bar which as you probably know ranges from 0~1

Hi Jail29,

I have looked into your problem and found the culprit, floating point precision errors result in slightly deviated floating values being compared. In this case the decremented value is equal to 0.0999999270 and the comparison value 0.100000001.

Relying on the floating point precision is something you will want to avoid in this case, however there is a Nearly Equal Blueprint node which takes into account an Error Tolerance. Combining this with a Greater Than node as seen in the attached image will give you the desired behaviour.

Cheers,

Jurre