Browse Source

Remove ant model from UI system

master
C. J. Howard 4 years ago
parent
commit
e771d4ccfe
3 changed files with 2 additions and 12 deletions
  1. +2
    -2
      src/game/systems/camera-system.cpp
  2. +0
    -9
      src/game/systems/ui-system.cpp
  3. +0
    -1
      src/game/systems/ui-system.hpp

+ 2
- 2
src/game/systems/camera-system.cpp View File

@ -34,8 +34,8 @@ camera_system::camera_system(entt::registry& registry):
viewport{0, 0, 0, 0},
mouse_position{0, 0}
{
orbit_cam.set_elevation_limits({math::radians(5.0f), math::radians(89.0f)});
//orbit_cam.set_elevation_limits({math::radians(-89.0f), math::radians(89.0f)});
//orbit_cam.set_elevation_limits({math::radians(5.0f), math::radians(89.0f)});
orbit_cam.set_elevation_limits({math::radians(-89.0f), math::radians(89.0f)});
orbit_cam.set_focal_distance_limits({2.0f, 200.0f});
orbit_cam.set_fov_limits({math::radians(80.0f), math::radians(35.0f)});
orbit_cam.set_clip_near_limits({0.1f, 5.0f});

+ 0
- 9
src/game/systems/ui-system.cpp View File

@ -46,12 +46,6 @@ ui_system::ui_system(::resource_manager* resource_manager):
tool_selector_bg.set_translation({0, 0, -4.0f});
tool_selector_bg.set_scale({270, 270, 270});
// Setup tool selector ant
tool_selector_ant.set_model(resource_manager->load<model>("worker-ant.obj"));
tool_selector_ant.set_scale({350, 350, 350});
tool_selector_ant.set_rotation(math::angle_axis(math::radians(180.0f), {0, 0, 1}) * math::angle_axis(math::radians(90.0f), {1, 0, 0}));
tool_selector_ant.update_tweens();
// Setup energy symbol
energy_symbol.set_model(resource_manager->load<model>("energy.obj"));
energy_symbol.set_scale({30, 30, 30});
@ -145,7 +139,6 @@ void ui_system::handle_event(const mouse_moved_event& event)
tool_selector_bg.set_rotation(math::angle_axis(rotation_angle, {0, 0, 1}));
tool_selector_bg.update_tweens();
tool_selector_ant.set_rotation(math::angle_axis(rotation_angle + math::radians(180.0f), {0, 0, 1}) * math::angle_axis(math::radians(90.0f), {1, 0, 0}));
}
}
@ -178,7 +171,6 @@ void ui_system::open_tool_menu()
{
scene->add_object(&modal_bg);
scene->add_object(&tool_selector_bg);
scene->add_object(&tool_selector_ant);
}
tool_selection_vector = {0, 0};
}
@ -189,7 +181,6 @@ void ui_system::close_tool_menu()
{
scene->remove_object(&modal_bg);
scene->remove_object(&tool_selector_bg);
scene->remove_object(&tool_selector_ant);
}
}

+ 0
- 1
src/game/systems/ui-system.hpp View File

@ -68,7 +68,6 @@ private:
camera* camera;
ambient_light indirect_light;
directional_light direct_light;
model_instance tool_selector_ant;
billboard tool_selector_bg;
material modal_bg_material;
billboard modal_bg;

Loading…
Cancel
Save