The output showed false correctly the first time, but even after velocity reached (0, 0) it remained false. This was done in Physics Process.
I have no clue how to proceed and any help is appreciated.

That’s the magic of floating point values. Comparing two floating point values for equality often fails. Most of the time it is better to work with error margins.

You can be lucky when the values have been initialized from the same source/assignment and not changed since then. But it is still risky.

Googling brought up this here:

But opposed to the source above I often work with error margins when comparing FP values. This works IMHO as long as you roughly know what values to expect.

So to compare a single value to 0 you could do:

if abs(vec2.x) < 0.000001:

The number is an arbitrary low number which should be somwhere above the floating point resolution for values in that range but low enough to satisfy your requirements.

If you want to compare to vectors then you could do:

if (vec2a - vec2b).length() < 0.000001:

This works best if both vectors stay in a certain number range (i.e. normalized vectors). But often enough you can also make the allowable margin bigger in this case.

Naturally it is best to define & use some constant for i.e. 0 comparisons.

Thank you. I’ll test this out tomorrow when I get back to my PC.