diff --git a/game_api.txt b/game_api.txt index d33c7c9..b74e82f 100644 --- a/game_api.txt +++ b/game_api.txt @@ -645,6 +645,7 @@ default.player_get_animation(player) bar = {x = 20, y = 39}, -- ... }, + eye_height = 1.47, -- In nodes above feet position } Leafdecay diff --git a/mods/default/player.lua b/mods/default/player.lua index 0a2078d..4a7c5fd 100644 --- a/mods/default/player.lua +++ b/mods/default/player.lua @@ -27,6 +27,7 @@ default.player_register_model("character.b3d", { walk_mine = { x=200, y=219, }, sit = { x= 81, y=160, }, }, + eye_height = 1.625, }) -- Player stats and animations @@ -58,12 +59,14 @@ function default.player_set_model(player, model_name) textures = player_textures[name] or model.textures, visual = "mesh", visual_size = model.visual_size or {x=1, y=1}, + eye_height = model.eye_height or 1.47, }) default.player_set_animation(player, "stand") else player:set_properties({ textures = { "player.png", "player_back.png", }, visual = "upright_sprite", + eye_height = 1.625, }) end player_model[name] = model_name