added logic for resolving collision between player and target