Hi, so I've been have some real problems with the test_move() function. In this demo, I've got this T shape and it can move around in an invisible grid as well as rotate 90 degrees clockwise. It should collide with these blue walls, and when simply moving - it does. But if I try to rotate next to a wall that is to the right of the T shape (when looking from its perspective by taking into account the rotation), the T shape kinda glitches out instead of just not moving or rotating at all like it is supposed to.
This is a gif where I try to demonstrate the problem:
Here is the code attached to the T shape:
var vel = Vector2(0, 0)
vel.x -= 20
vel.x += 20
vel.y -= 20
vel.y += 20
if Input.is_action_just_pressed("rotate") and \
not test_move(Transform2D(global_rotation + deg2rad(90), global_position), Vector2(0, 0)):
And this is the whole demo project
Any help is appreciated!