You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Target(s): At least Windows, Neko, and HTML5, but I suspect all platforms
Haxe version: 3.4.7
OpenFL/Lime or NME version: OpenFL 8.0.0, Lime 6.3.0
I'm noticing an issue where if I have a simple piece of code like
if (collide("level", x, y) == null) {
this.y ++;
}
The result is that the Entity will travel one pixel into the grid, vertically. I haven't fully tested but I'm fairly certain this also happens on the x axis as well.
This seems to only happen when the Entity's y value is a non-integer.
I tried finding a solution for this but I couldn't seem to find where the problem was. Hopefully someone here has better luck.
Thanks,
Taylor Anderson.
The text was updated successfully, but these errors were encountered:
This was also the case in another engine I used to use, but the solution wasn't to fix their engine it was actually to just ceil or floor the positions you're using in the collision function.
The problem is somewhat in your control as well . . . this may be more of a feature request rather than a bug. . .
The second problem is that both instances can have decimal locations, so that causes more precision problems to work with. In most cases you'll know how you want the interactions to happen and understand what instances move in non-integer increments, so you should try to work with that in mind. It would be much harder for us to generalize the common precision problem in programming since its not a problem for every game.
I'm noticing an issue where if I have a simple piece of code like
The result is that the Entity will travel one pixel into the grid, vertically. I haven't fully tested but I'm fairly certain this also happens on the x axis as well.
This seems to only happen when the Entity's y value is a non-integer.
I tried finding a solution for this but I couldn't seem to find where the problem was. Hopefully someone here has better luck.
Thanks,
Taylor Anderson.
The text was updated successfully, but these errors were encountered: