this is what i used and it works:
col = move_and_collide(Vector2(0,-5), true, true, true)
if col && col.collider.get_instance_id() == id1:
col = move_and_collide(Vector2(0,5), true, true, true)
if col && col.collider.get_instance_id() == id2:
print("collision")
i dunno why i didnt think of this before. if i run into problems i will try raycast next.