Make wind dependent on height, add additional control commands, improve docu

This commit is contained in:
Till Affeldt
2020-05-13 16:03:28 +02:00
parent f42b4183e5
commit d4e00db432
14 changed files with 142 additions and 55 deletions

View File

@ -35,7 +35,7 @@ local function check_hit(player, ray)
-- use raycating to factor in wind speed
local origin = vector.add(ppos, {x = 0, y = ray.height or 0, z = 0 })
if ray.use_wind ~= false then
local wind = climate_api.environment.get_wind()
local wind = climate_api.environment.get_wind(origin)
local velocity = ray.velocity or 1
local windpos = vector.multiply(
vector.normalize(vector.add({ x = 0, y = -velocity, z = 0 }, wind)),