I know that there are several floating-point number precision errors in Fusion already. I'm not sure if this is quite the same as those.
I'm using linear interpolation to seek a target active for my camera system. There isn't any issue with the movement itself; it performs exactly as expected for the most part. The problem is when I try to compare the "pos" positions (the values I make track the player) to anything. For example, when xtarget = xpos and ytarget = ypos then set a counter to 1. Looking in the debugger after movement, both pos values will be equal to their targets, but the counter never sets to 1. A screenshot of what I mean:
You can clearly see the values are equal to each other, but the counter won't set to 1. I thought maybe there might be trailing floats even though it is displaying ints, so i tried xtarget = int(xpos) and same for y to see if that fixed it, but still nothing. Comparing to Round(pos) fixes it, but this results in false positives for the condition when the camera has't actually reached the target and isn't desireable. You'll also notice looking at the debugger that the xvel and yvel values will go haywire even when the object is at the target and should no longer be using them. I'd like some insight into why this might be happening!
cam rounding bug.mfa