mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Fix minimap arrow orientation and ground-detail foliage transparency
This commit is contained in:
parent
0631b9f5dc
commit
8efc1548dc
5 changed files with 45 additions and 91 deletions
|
|
@ -472,7 +472,8 @@ void Minimap::compositePass(VkCommandBuffer cmd, const glm::vec3& centerWorldPos
|
|||
|
||||
void Minimap::render(VkCommandBuffer cmd, const Camera& playerCamera,
|
||||
const glm::vec3& centerWorldPos,
|
||||
int screenWidth, int screenHeight) {
|
||||
int screenWidth, int screenHeight,
|
||||
float playerOrientation, bool hasPlayerOrientation) {
|
||||
if (!enabled || !hasCachedFrame || !displayPipeline) return;
|
||||
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, displayPipeline);
|
||||
|
|
@ -511,8 +512,15 @@ void Minimap::render(VkCommandBuffer cmd, const Camera& playerCamera,
|
|||
|
||||
float arrowRotation = 0.0f;
|
||||
if (!rotateWithCamera) {
|
||||
glm::vec3 fwd = playerCamera.getForward();
|
||||
arrowRotation = std::atan2(-fwd.x, fwd.y);
|
||||
// Prefer authoritative player orientation for north-up minimap arrow.
|
||||
// Canonical yaw already matches minimap rotation convention:
|
||||
// 0=north, +pi/2=east.
|
||||
if (hasPlayerOrientation) {
|
||||
arrowRotation = playerOrientation;
|
||||
} else {
|
||||
glm::vec3 fwd = playerCamera.getForward();
|
||||
arrowRotation = std::atan2(-fwd.x, fwd.y);
|
||||
}
|
||||
}
|
||||
|
||||
MinimapDisplayPush push{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue