Hi,
I found a bug. When I have two monitors and focus on a window on my second screen, the pet moves to the corresponding position on the first screen instead of staying on the focused window.
I think this solution might solve the issue
var total_size = Vector2i.ZERO; for screen in DisplayServer.get_screen_count()-1: total_size += DisplayServer.screen_get_size(screen) var real_position = your_window_data.rect.position+Vector2(total_size)