Avoids crash caused when 'pointed thing -under' and '-above' are not
face-neighbours, for example in the case of pointing to the top half
of a door.
local oc = {}
for c, v in pairs(pos_off) do
- if v == 0 then
+ if nc or v == 0 then
oc[#oc + 1] = c
else
offset = v
nc = c
end
end
+
local fine_pos = {[nc] = node_pos[nc] + offset}
camera_pos.y = camera_pos.y + 1.625 + eye_offset_first.y / 10
local f = (node_pos[nc] + offset - camera_pos[nc]) / look_dir[nc]
end
return fine_pos
end
-