# How do I allow my player object to continue rotating once it's met a clamped boundary?

I have a spaceship I'm moving around on the screen, when the player moves the ship, it rotates on its axis. However, when the ship meets a clamped boundary(on the x-axis) it abruptly stops. How do I make it so that the ship will still rotate when it hits the clamped boundary?

void Controls(){
Rotate();
MoveShip();
}
void Rotate(){
player.rotation = Quaternion.Euler((player.velocity.y * -pitchAngle), 0f, (player.velocity.x * -bankRotation));
}
void MoveShip(){
float moveVertical = Input.GetAxis("Vertical");
float moveHorizontal = Input.GetAxis("Horizontal");
Vector3 bank = new Vector3(moveHorizontal, 0f, 0f);
Vector3 pitch = new Vector3(0f, moveVertical, 0f);
player.position = new Vector3(Mathf.Clamp(player.position.x, xMin, xMax), Mathf.Clamp(player.position.y, yMin, yMax), 0f);
if((player.position.x == xMin) || (player.position.x == xMax) || (player.position.y == yMin) || (player.position.y == yMax)){
player.velocity = new Vector3(0f, 0f, 0f);
player.angularVelocity = new Vector3(0f, 0f, 0f);
}
}


The question that this one has been marked a duplicate of, the question I asked, does not address what this question is asking. That question asked "Why was the player object continuing to move passed the clamped boundaries?". This question is asking "How do I keep the player object rotating once it hist those clamped boundaries?" Two completely different questions asking two completely different things.