update base:drop component

This commit is contained in:
MihailRis
2024-11-26 11:01:29 +03:00
parent 51eadd397c
commit b3ac1bd8f4
5 changed files with 25 additions and 9 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ function on_hud_open()
local pvel = {player.get_vel(pid)}
local ppos = vec3.add({player.get_pos(pid)}, {0, 0.7, 0})
local throw_force = vec3.mul(player.get_dir(pid), DROP_FORCE)
local drop = base_util.drop(ppos, itemid, 1)
local drop = base_util.drop(ppos, itemid, 1, 1.5)
local velocity = vec3.add(throw_force, vec3.add(pvel, DROP_INIT_VEL))
drop.rigidbody:set_vel(velocity)
end)