I’m developing a board game, and the pieces move smoothly between squares using the engine. The physics engine is good, and I like that.
However, when exporting it to Android, this movement changes. When a piece moves from one square to another, it disappears from its original position and appears outside the board in the next square.
Does anyone know why this happens and how to fix it?
I’m using a CanvasLayer (layer=100) to animate a TextureRect moving from one grid cell to another. The animation works perfectly in the Godot editor, but on Android the piece disappears from its position and appears flying in from outside the screen.
Here’s the relevant code:
var src_center = src_btn.global_position + src_btn.size / 2
var dst_center = dst_btn.global_position + dst_btn.size / 2
The Windows and Android versions do indeed behave differently when exporting. I assume this is due to differences between the operating systems themselves and how they function. I suspect you’ll need to fine-tune the project manually.
You can compare them — I used exactly the same code here, but in the Android version, you can see the lighting on the clothing when it changes, whereas in the Windows version, that layer is invisible.