We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The camera should be moved when the cursor goes near the edge of the screen (RTS style).
Sample code:
var camera_move = Vector2(0,0) #...Other ways to move the camera... var mouse_move = (get_global_mouse_pos() - camera.get_global_pos()) / get_viewport_rect().size * get_viewport_transform().get_scale() * 2 var mouse_distance = max(abs(mouse_move.x), abs(mouse_move.y)) if mouse_distance > 0.9: camera_move += mouse_move camera.set_pos(camera.get_pos() + camera_move * camera_speed * delta )
The text was updated successfully, but these errors were encountered:
alketii
No branches or pull requests
The camera should be moved when the cursor goes near the edge of the screen (RTS style).
Sample code:
The text was updated successfully, but these errors were encountered: