diff --git a/creator/src/tools/picker.rs b/creator/src/tools/picker.rs index 285c70fa..76f596cb 100644 --- a/creator/src/tools/picker.rs +++ b/creator/src/tools/picker.rs @@ -253,13 +253,6 @@ impl Tool for PickerTool { } } } - // MODELFXEDITOR - // .lock() - // .unwrap() - // .set_geo_node_ui(server_ctx, project, ui, ctx); - // if clicked_tile { - // self.set_editor_group_index(EditorMode::Draw, ui, ctx); - // } false } } diff --git a/creator/src/tools/tiledrawer.rs b/creator/src/tools/tiledrawer.rs index 58f947b5..b8a49c6d 100644 --- a/creator/src/tools/tiledrawer.rs +++ b/creator/src/tools/tiledrawer.rs @@ -33,7 +33,7 @@ impl Tool for TileDrawerTool { fn tool_event( &mut self, tool_event: ToolEvent, - _tool_context: ToolContext, + tool_context: ToolContext, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, @@ -65,6 +65,14 @@ impl Tool for TileDrawerTool { } }; + // When we draw in 2D, move the 3D view to the pen position + if tool_context == ToolContext::TwoD && server_ctx.curr_character_instance.is_none() { + if let Some(region) = project.get_region_mut(&server_ctx.curr_region) { + region.editing_position_3d = Vec3f::new(coord.x as f32, 0.0, coord.y as f32); + server.set_editing_position_3d(region.editing_position_3d); + } + } + if let Some(curr_tile_id) = server_ctx.curr_tile_id { if TILEDRAWER.lock().unwrap().tiles.contains_key(&curr_tile_id) { if server_ctx.curr_layer_role == Layer2DRole::FX {