Open ghost opened 2 years ago
As per the linked forum topic, this can be solved using this additional event:
But I'd expect it to work like this without needing to specify that additional action...
Hi @BWPanda, Thanks for taking the time to report this.
Could it be possible for you to send over the project of the example you used to make the gifs?
Would be way easier for us to debug.
No worries. I kept it around just in case: scale_tweening.zip
At first glance, it's not a problem with tweens but a rounding problem: When setting the object position by its center, a few computations are made and javascript has trouble computing round values for positions:
You can see that it's not a problem due to tweens with the following event:
When you use a tween to scale an object down to 0, then move it to a new position and scale it back up again, it doesn't align properly to the grid as expected. Here's an example:
The player is scaled down to 0, then moved so that its center aligns with the center of the portal object (the grid and all objects in this example are 50x50px). It's then scaled up, but as it's somehow off-center, it collides with the enemy objects and dies.
This shouldn't happen, as the player can fit nicely on the portal object without touching the enemies:
The discussion around this issue in https://forum.gdevelop.io/t/scale-tween-doesnt-properly-align-object-to-grid/41974 seemed to suggest it might be a bug...