We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b1fd6 commit aac2ec4Copy full SHA for aac2ec4
SerialPrograms/Source/PokemonSV/Programs/PokemonSV_WorldNavigation.cpp
@@ -264,8 +264,8 @@ bool detect_closest_pokecenter_and_move_map_cursor_there(
264
}
265
266
// Convert the vector from center to the PokeCenter icon into a left joystick movement
267
- const double dif_x = closest_icon_x - center_x;
268
- const double dif_y = closest_icon_y - center_y;
+ const double dif_x = (closest_icon_x - center_x) * 1920/ screen_width;
+ const double dif_y = (closest_icon_y - center_y) * 1080/ screen_height;
269
const double magnitude = std::max(std::sqrt(max_dist), 1.0);
270
const double push_x = dif_x * 64 / magnitude, push_y = dif_y * 64 / magnitude;
271
0 commit comments