Skip to content

Commit 62872da

Browse files
committedJan 12, 2018
Lua_api.txt: Fix, improve and add to Object Properties documentation
Correct 'automatic rotate' to be a number instead of a bool.
1 parent 05e9e12 commit 62872da

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed
 

‎doc/lua_api.txt

+21-2
Original file line numberDiff line numberDiff line change
@@ -4380,18 +4380,37 @@ Definition tables
43804380
weight = 5,
43814381
collisionbox = {-0.5, 0.0, -0.5, 0.5, 1.0, 0.5},
43824382
selectionbox = {-0.5, 0.0, -0.5, 0.5, 1.0, 0.5},
4383-
-- ^ Default, uses collision box dimensions when not set
4383+
-- ^ Default, uses collision box dimensions when not set.
4384+
-- ^ For both boxes: {xmin, ymin, zmin, xmax, ymax, zmax} in nodes from
4385+
-- object position.
43844386
pointable = true, -- overrides selection box when false
43854387
visual = "cube" / "sprite" / "upright_sprite" / "mesh" / "wielditem",
4388+
-- ^ "cube" is a node-sized cube.
4389+
-- ^ "sprite" is a flat texture always facing the player.
4390+
-- ^ "upright_sprite" is a vertical flat texture.
4391+
-- ^ "mesh" uses the defined mesh model.
43864392
visual_size = {x = 1, y = 1},
4393+
-- ^ `x` multiplies horizontal (X and Z) visual size.
4394+
-- ^ `y` multiplies vertical (Y) visual size.
43874395
mesh = "model",
43884396
textures = {}, -- number of required textures depends on visual
4397+
-- ^ "cube" uses 6 textures in the way a node does.
4398+
-- ^ "sprite" uses 1 texture.
4399+
-- ^ "upright_sprite" uses 2 textures: {front, back}.
43894400
colors = {}, -- number of required colors depends on visual
43904401
spritediv = {x = 1, y = 1},
4402+
-- ^ Used with spritesheet textures for animation and/or frame selection according
4403+
-- to position relative to player.
4404+
-- ^ Defines the number of columns and rows in the spritesheet: {columns, rows}.
43914405
initial_sprite_basepos = {x = 0, y = 0},
4406+
-- ^ Used with spritesheet textures.
4407+
-- ^ Defines the {column, row} position of the initially used frame in the
4408+
-- spritesheet.
43924409
is_visible = true,
43934410
makes_footstep_sound = false,
4394-
automatic_rotate = false,
4411+
automatic_rotate = 0,
4412+
-- ^ Set constant rotation in radians per second, positive or negative.
4413+
-- ^ Set to 0 to disable constant rotation.
43954414
stepheight = 0,
43964415
automatic_face_movement_dir = 0.0,
43974416
-- ^ Automatically set yaw to movement direction, offset in degrees,

0 commit comments

Comments
 (0)
Please sign in to comment.