I'm having a strange issue. I have an object that is set to always set its Y position to the Y position of another objects image point. This works for most parts, but some time the first objects position will be something like 120.00000077486038 instead of 120, which causes problems. How does that even happen? Everything moves in steps of fixed integers. Is there a way to make sure a position is fixed to the closest integer?
You can set it to floor(object.y) which rounds it down or ceil(object.y) which rounds it up.
Is there a way to round it just the closest?
round(position.y) is specifically the closest integer
Develop games in your browser. Powerful, performant & highly capable.
Ah, awesome. Thanks!
You should also set "Pixel rounding" in the properties of your project to help out further keeping to integers.
I had completely missed that that is an options, thanks!