mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
add new block.get_AXIS functions overloads & add rotation support to base:falling_block
This commit is contained in:
parent
9a190acb8b
commit
ab5a62c3aa
9 changed files with 72 additions and 75 deletions
|
|
@ -13,9 +13,12 @@ else
|
|||
end
|
||||
|
||||
do -- setup visuals
|
||||
local textures = block.get_textures(block.index(blockid))
|
||||
local id = block.index(blockid)
|
||||
local rotation = block.decompose_state(blockstates)[1]
|
||||
local textures = block.get_textures(id)
|
||||
for i,t in ipairs(textures) do
|
||||
rig:set_texture("$"..tostring(i-1), "blocks:"..textures[i])
|
||||
rig:set_matrix(0, mat4.look_at({0,0,0}, {block.get_Z(id, rotation)}, {block.get_Y(id, rotation)}))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue