added rotation collision logic.