Hi Krock,
Thanks for your reply,
I'm testing it on a sign first. It works but I don't fully understand the results.
The sign has paramtype2 set to "wallmounted"
I've tried the following direction with the results listed.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
-- local rotation = minetest.dir_to_facedir({x=1,y=0,z=0}) --sign facing up
-- local rotation = minetest.dir_to_facedir({x=0,y=1,z=0}) -- same result as default sign floating facing down
-- local rotation = minetest.dir_to_facedir({x=0,y=0,z=1}) -- same result as default
-- local rotation = minetest.dir_to_facedir({x=-1,y=0,z=0}) -- sign facing east
-- local rotation = minetest.dir_to_facedir({x=0,y=0,z=-1}) -- sign facing west
local rotation = minetest.dir_to_facedir({x=0,y=-1,z=0})-- same result as default
Who can shed some light?
I found this description in "lua_api.txt"
but it does not explain what the input vector for dir_to_facedir should be.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
paramtype2 == "wallmounted"
^ The rotation of the node is stored in param2. You can make this value
by using minetest.dir_to_wallmounted().
paramtype2 == "facedir"
^ The rotation of the node is stored in param2. Furnaces and chests are
rotated this way. Can be made by using minetest.dir_to_facedir().
Values range 0 - 23
facedir modulo 4 = axisdir
0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y-
facedir's two less significant bits are rotation around the axis