HUD interpolation, and a POI marker test
This commit is contained in:
parent
ba17b7f195
commit
889aa531ba
7 changed files with 393 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue