minetest.dir_to_wallmounted

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

Description

Convert a vector to a wallmounted value, used for paramtype2 = "wallmounted"

result direction
0 y
1 -y
2 x
3 -x
4 z
5 -z

Example

local wallmounted = minetest.dir_to_wallmounted({x=0,y=0,z=1})
-- wallmounted == 4
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox