chr_stoev
I have never used fixed point position before. I guess that would fix some of the rounding errors.
I could also multiply every position with 10000 or something and just use plain ints or is that a bad idea?
That is, more or less, what fixed point is.
Decide on a level of precision you want. For example, a common format is 24.8 -- a 32 bit integer where we treat the lowest 8 bits as a fractional part. (You can choose whatever arbitrary split you want.) You multiply a float by 256 and then round to produce the correct fixed point value. Going the other way around, you can subtract two fixed point values, cast the result to float, and then divide by 256 to get your delta as a float value. (Make sure you cast *after* the subtraction, when you have a smaller number that can actually fit in a float's precision range.)
Conceptually, you can think of fixed point as being the top of a fraction, with the bottom being whatever your implied fractional size is. So, for 24.8:
fixed(n) = (n * 256) / 256
Now, this doesn't necessarily *fix* your issue. If your physics are getting hung up on tiny inconsistencies you probably need some kind of epsilon in there to smooth things over. (Assuming your math is correct otherwise.) But trying to find said epsilon without consistent precision is going to be incredibly frustrating.