Removed crash, when fbx has no material. Added rotation + offset to physx boxes
This commit is contained in:
@@ -167,7 +167,9 @@ base_editor_update :: () {
|
||||
}
|
||||
|
||||
camera := *engine.editor.camera;
|
||||
blocking_input := ImGui.GetIO().WantCaptureMouse || ImGui.GetIO().WantCaptureKeyboard;
|
||||
|
||||
capture_mouse := ImGui.GetIO().WantCaptureMouse;
|
||||
capture_keyboard := ImGui.GetIO().WantCaptureKeyboard;
|
||||
|
||||
if engine.editor.focused_widget == null && engine.mode == .EDITING {
|
||||
engine.editor.should_check_entities = true;
|
||||
@@ -184,14 +186,14 @@ base_editor_update :: () {
|
||||
//coordinates := Vector2.{engine.editor.mouse_viewport_state.normalized_local_mouse_coordinates.x, 1.0 - engine.editor.mouse_viewport_state.normalized_local_mouse_coordinates.y};
|
||||
ray := normalized_screen_to_ray(engine.editor.camera, coordinates);
|
||||
|
||||
if !blocking_input {
|
||||
if !capture_mouse {
|
||||
if update_transform_gizmo(ray, coordinates) {
|
||||
engine.editor.should_check_entities = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !blocking_input {
|
||||
if !capture_keyboard {
|
||||
if key_pressed(.CTRL) && key_down(.Z) {
|
||||
undo();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user