finally implemented direction of collision on player