HUD interpolation, and a POI marker test

This commit is contained in:
Signal 2025-10-07 13:59:33 -04:00
parent ba17b7f195
commit 889aa531ba
7 changed files with 393 additions and 4 deletions

View file

@ -40,6 +40,9 @@ Player = {
e.eye_height = 1.6
e.hud = {}
e.poi = {}
e:update_hp(p:get_hp())
return e
@ -76,7 +79,7 @@ Player = {
end
local pitch = p:get_look_vertical()
local yaw = p:get_look_horizontal()
local dir = p:get_look_dir()
m.dir = p:get_look_dir()
local pos = p:get_pos()
pos.y = pos.y +m.eye_height
@ -223,7 +226,7 @@ Player = {
m.pointed_node = nil
local pointed_found = false
for pointed in minetest.raycast(pos, pos +(dir *7)) do -- TODO: Automatic range
for pointed in minetest.raycast(pos, pos +(m.dir *7)) do -- TODO: Automatic range
if pointed and pointed.type == "object" then
local e = pointed.ref:get_luaentity()
if e then