feat: add more collider types + camera snapping fix

This commit is contained in:
2026-10-24 02:34:09 +02:00
parent 355dfa7851
commit 118016bcc7
26 changed files with 1525 additions and 354 deletions
+14
View File
@@ -59,10 +59,24 @@ namespace {
SceneManager::GetInstance().Destroy();
}
void testCameraKeysDoNotEndEditGestures()
{
check(!EndsEditGesture({.keyReleased = true, .keyboardDrivesCamera = true}),
"releasing a key while flying the editor camera must not capture an undo snapshot");
check(EndsEditGesture({.keyReleased = true}), "releasing a key outside the viewport still ends an edit");
check(EndsEditGesture({.keyboardDrivesCamera = true, .editPending = true}),
"viewport shortcuts that edit (delete, duplicate) still end an edit");
check(EndsEditGesture({.mouseReleased = true, .keyboardDrivesCamera = true}),
"releasing the mouse after a viewport drag still ends an edit");
check(!EndsEditGesture({.itemWasActive = true, .itemActive = true, .mouseReleased = true}),
"nothing ends while an item is still being edited");
}
}
void RunEditorTests()
{
testUndoRedoRestoresEdits();
testUndoHistoryIsCapped();
testCameraKeysDoNotEndEditGestures();
}