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:
Kelsi 2026-05-05 03:55:53 -07:00
parent f38884856f
commit ace6173401
4 changed files with 40 additions and 7 deletions

View file

@ -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; }