I've been trying to make a game with Python Arcade Library and I got the scrolling and aiming function ready, but for some reason, while I'm scrolling, the crosshair that's following the mouse suddenly stops and it cannot go over that point. Also, the crosshair sprite isn't exactly "following" the mouse cursor. It becomes offset from the mouse after a bit.
# Manage Scrolling
self.view_left = SCREEN_WIDTH / 2 - (self.crosshair.center_x - self.anchor.center_x) / 2
self.view_bottom = (self.crosshair.center_y - self.anchor.center_y) / 2 - SCREEN_HEIGHT / 2
# Do the scrolling
arcade.set_viewport(self.view_left, self.view_left + SCREEN_WIDTH, self.view_bottom, self.view_bottom + SCREEN_HEIGHT)
I'm trying to make it so that the middle point of the viewport is on the middle point between the player sprite and the character.