I've already asked that on Discord as well, but got no response so I'll repost it here:
I'm trying to solve a problem with Godot not detecting collisions. I've visualized it here:
I'm controlling a ball that hits tiles and certain tiles move one step (25px) when hit. They shouldn't move when there's another tile or the field border in that direction.
This sometimes seem to work (check the left tile hitting the border) and sometimes not (the on tile right from the working tile)
Now I'm wondering. I'm doing the whole collision detection and movement of the tile (I use moveandcollide to move the tile) inside physicsprocess. Do I need to multiply the target vector for the tile with delta as well? I'd like to check, if the tile can move 25 pixels in the target direction and if so move it there directly.
I've tried to narrow down the problem and it gets rrrreally strange.
It happens when three tiles are directly next to each other. Then the middle tile can be pushed out of the field and after that all the other tiles as well.
See it in action:
I'm completely stumped.
Here's the relevant code part:
var target_vector = normal * grid_size.x * -1
var disc_collision = tile.move_and_collide(target_vector, false, true, true)
if disc_collision == null: