mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
fix(editor): terrain raycast on rough terrain, keyboard shortcuts, context menu
- Raycast AABB now uses actual min/max vertex heights per chunk instead of fixed ±200 padding (fixes misses on sculpted terrain) - Right-click context menu opens correctly (deferred popup via flag since ImGui::OpenPopup must be called within ImGui frame) - Keyboard shortcuts: G=Move, R=Rotate, T=Scale, X/Y=axis lock, Escape=deselect, Delete works in any mode for objects/NPCs - Delete key now removes selected NPC in NPC mode too
This commit is contained in:
parent
f38884856f
commit
ace6173401
4 changed files with 40 additions and 7 deletions
|
|
@ -592,6 +592,10 @@ void EditorUI::renderWaterPanel(EditorApp& app) {
|
|||
}
|
||||
|
||||
void EditorUI::renderContextMenu(EditorApp& app) {
|
||||
if (app.shouldOpenContextMenu()) {
|
||||
ImGui::OpenPopup("ObjectContextMenu");
|
||||
app.clearContextMenuFlag();
|
||||
}
|
||||
if (ImGui::BeginPopup("ObjectContextMenu")) {
|
||||
auto* sel = app.getObjectPlacer().getSelected();
|
||||
if (!sel) { ImGui::EndPopup(); return; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue