Add Endemic Life Head Tracking

This commit is contained in:
GreenComfyTea
2024-05-06 19:08:08 +03:00
parent 30d858b1f8
commit d4c52617d9
6 changed files with 107 additions and 10 deletions

View File

@@ -86,7 +86,12 @@ function this.draw()
cached_config.world_offset.z
);
local position_on_screen = draw.world_to_screen(creature.position + world_offset);
local position_on_screen;
if cached_config.settings.head_tracking then
position_on_screen = draw.world_to_screen(creature.head_position + world_offset);
else
position_on_screen = draw.world_to_screen(creature.position + world_offset);
end
if position_on_screen == nil then
goto continue;

View File

@@ -2310,6 +2310,11 @@ function this.draw_endemic_life_UI()
config_changed = config_changed or changed;
if imgui.tree_node(language.current_language.customization_menu.settings) then
changed, cached_config.settings.head_tracking = imgui.checkbox(
language.current_language.customization_menu.head_tracking, cached_config.settings.head_tracking);
config_changed = config_changed or changed;
changed, cached_config.settings.hide_inactive_creatures = imgui.checkbox(
language.current_language.customization_menu.hide_inactive_creatures, cached_config.settings.hide_inactive_creatures);