Lua bindings for path finding
Add Lua bindings for path finding via recast navigation.
Initial API proposal:
local util = require('openmw.util')
local nearby = require('openmw.nearby')
local from = util.vector3(x1, y1, z1)
local to = util.vector3(x2, y2, z2)
local options = {
-- whether use doors, whether can swim, whether can fly
-- what else?
}
local path = nearby.findPath(from, to, options)
if path then
for i, point in ipairs(path) do
print(string.format('Point %d: x=%f y=%f z=%f', i, point.x, point.y, point.z))
end
else
print('Can not find path')
end