mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-19 20:44:53 -04:00
Make wind dependent on height, add additional control commands, improve docu
This commit is contained in:
parent
f42b4183e5
commit
d4e00db432
14 changed files with 142 additions and 55 deletions
|
@ -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)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue