mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: show directional arrow on world map player marker
Replace the static filled circle with a red triangle arrow that rotates to match the character's current facing direction. Uses the same render-space yaw convention as the 3D scene so the arrow matches in-world orientation.
This commit is contained in:
parent
b23dbc9ab7
commit
8b9d626aec
3 changed files with 24 additions and 8 deletions
|
|
@ -6539,10 +6539,11 @@ void GameScreen::renderWorldMap(game::GameHandler& gameHandler) {
|
|||
}
|
||||
|
||||
glm::vec3 playerPos = renderer->getCharacterPosition();
|
||||
float playerYaw = renderer->getCharacterYaw();
|
||||
auto* window = app.getWindow();
|
||||
int screenW = window ? window->getWidth() : 1280;
|
||||
int screenH = window ? window->getHeight() : 720;
|
||||
wm->render(playerPos, screenW, screenH);
|
||||
wm->render(playerPos, screenW, screenH, playerYaw);
|
||||
|
||||
// Sync showWorldMap_ if the map closed itself (e.g. ESC key inside the overlay).
|
||||
if (!wm->isOpen()) showWorldMap_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue