entity.get_rot, .set_rot
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"hitbox": [0.2, 0.2, 0.2]
|
||||
"hitbox": [0.2, 0.15, 0.2]
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ function on_hud_open()
|
||||
local eid = entity.spawn("base:drop")
|
||||
local throw_force = vec3.mul(player.get_dir(pid), DROP_FORCE)
|
||||
entity.set_vel(eid, vec3.add(throw_force, vec3.add(pvel, DROP_INIT_VEL)))
|
||||
entity.set_rot(eid, mat4.rotate({0, 1, 0}, math.random() * 360))
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user