Changed collision detection to rectangle collision