Add collision detection for rotation