How does KinematicBody test_move work exactly? [Godot3]
I'm doing a blockout (3d tetris) test/warmup project.
I've got a block that moves on increments (down on timer, x and z axis controlled by player)
It's defined as KinematicBody with 4 blocks as children (each with it's own box mesh and box CollisionShape)
I've tried using test_move to move the piece inside well and stop on collisions, but it doesn't really do that.
here is a code that I've tried to make it go down
the well is a StaticBody with plane CollisionShape for each wall and floor
if not activePiece.test_move(activePiece.transform,Vector3(0,-1,0)): activePiece.global_translate(Vector3(0,-1,0))
doesn't matter if I use transform or global_transform.
bool test_move ( Transform from, Vector3 rel_vec )
Checks for collisions without moving the body. Virtually sets the node’s position, scale and rotation to that of the given Transform, then tries to move the body along the vector rel_vec. Returns true if a collision would occur.
but it always returns false in my case
When I use move_and_collide function it moves and stops whenever it touches well boundaries and won't continue down, which is expected as it should stop on collisions.