def rot_state(self, x, y):
if self.last_x is None:<EOL><INDENT>self.last_x = x<EOL><DEDENT>if self.last_y is None:<EOL><INDENT>self.last_y = y<EOL><DEDENT>x_offset = self.last_x - x<EOL>y_offset = self.last_y - y<EOL>self.last_x = x<EOL>self.last_y = y<EOL>x_offset *= self.mouse_sensitivity<EOL>y_offset *= self.mouse_sensitivity<EOL>self.yaw -= x_offset<EOL>self.pitch += y_offset<EOL>if self.pitch > <NUM_LIT>:<EOL><INDENT>self.pitch = <NUM_LIT><EOL><DEDENT>if self.pitch < -<NUM_LIT>:<EOL><INDENT>self.pitch = -<NUM_LIT><EOL><DEDENT>self._update_yaw_and_pitch()<EOL>
Set the rotation state of the camera

:param x: viewport x pos
:param y: viewport y pos