diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index ffb9cd23..8bef5f00 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -1527,6 +1527,7 @@ void EditorUI::renderObjectPanel(EditorApp& app) { float rot = placer.getPlacementRotationY(); if (ImGui::SliderFloat("Y Rotation", &rot, 0.0f, 360.0f, "%.0f deg")) placer.setPlacementRotationY(rot); + ImGui::TextDisabled("Tip: Ctrl+Wheel rotates while placing (Shift = fine)"); bool randRot = placer.getRandomRotation(); if (ImGui::Checkbox("Random Rotation", &randRot)) placer.setRandomRotation(randRot); diff --git a/tools/editor/editor_viewport.cpp b/tools/editor/editor_viewport.cpp index 396ea9ce..44ae4dc6 100644 --- a/tools/editor/editor_viewport.cpp +++ b/tools/editor/editor_viewport.cpp @@ -552,6 +552,17 @@ void EditorViewport::updateNpcMarkers(const std::vector& npcs) { v.pos[0]=x+ts; v.pos[1]=y; v.pos[2]=tz; verts.push_back(v); v.pos[0]=x-ts; v.pos[1]=y; v.pos[2]=tz; verts.push_back(v); v.pos[0]=x; v.pos[1]=y-ts; v.pos[2]=tz; verts.push_back(v); + + // Facing arrow on the ground: triangle pointing in the orientation direction. + // Helps users see which way each NPC faces without selecting it. + float yaw = glm::radians(npc.orientation); + float fx = std::cos(yaw), fy = std::sin(yaw); + float perpX = -fy, perpY = fx; + float arrowLen = s * 2.5f, arrowHalfW = s * 0.8f; + v.color[0]=1.0f; v.color[1]=0.9f; v.color[2]=0.2f; v.color[3]=0.85f; + v.pos[0]=x + fx*arrowLen; v.pos[1]=y + fy*arrowLen; v.pos[2]=z+0.25f; verts.push_back(v); + v.pos[0]=x + perpX*arrowHalfW; v.pos[1]=y + perpY*arrowHalfW; v.pos[2]=z+0.25f; verts.push_back(v); + v.pos[0]=x - perpX*arrowHalfW; v.pos[1]=y - perpY*arrowHalfW; v.pos[2]=z+0.25f; verts.push_back(v); } npcMarkerVertCount_ = static_cast(verts.size()); VkBufferCreateInfo bi{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};