mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix transform:set_pos
This commit is contained in:
parent
a105a4f2c7
commit
ee768f878c
3 changed files with 13 additions and 5 deletions
|
|
@ -106,10 +106,14 @@ console.add_command(
|
|||
)
|
||||
|
||||
console.add_command(
|
||||
"tp obj:sel=$obj.id x:num~pos.x y:num~pos.y z:num~pos.z",
|
||||
"Teleport object",
|
||||
"tp entity:sel=$entity.id x:num~pos.x y:num~pos.y z:num~pos.z",
|
||||
"Teleport entity",
|
||||
function (args, kwargs)
|
||||
player.set_pos(unpack(args))
|
||||
local eid, x, y, z = unpack(args)
|
||||
local entity = entities.get(eid)
|
||||
if entity ~= nil then
|
||||
entity.transform:set_pos({x, y, z})
|
||||
end
|
||||
end
|
||||
)
|
||||
console.add_command(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue