mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add vec3.random_normal and fix entities cleanup moment
This commit is contained in:
parent
d8c9fa1fe2
commit
257ba86183
4 changed files with 39 additions and 11 deletions
|
|
@ -26,7 +26,8 @@ function on_grounded()
|
|||
block.set(ix, iy, iz, block.index(blockid))
|
||||
else
|
||||
local picking_item = block.get_picking_item(block.index(blockid))
|
||||
entities.spawn("base:drop", pos, {item={id=picking_item, count=1}})
|
||||
local drop = entities.spawn("base:drop", pos, {item={id=picking_item, count=1}})
|
||||
drop.rigidbody:set_vel(vec3.spherical_rand(5.0))
|
||||
end
|
||||
entity:despawn()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue