BlockFace

A BlockFace represents the face of a Block.

It can be returned when casting a ray, to know which block face has been touched. (see Impact.FaceTouched)

It's also a useful parameter to functions like Block.AddNeighbor, to indicate where to place a Block next to another.

Builtin BlockFace instances can be used, there's no way to create custom BlockFaces.

Built-in instances

BlockFace Back read-only

Back face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Back)
BlockFace Bottom read-only

Bottom face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Bottom)
BlockFace Front read-only

Front face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Front)
BlockFace Left read-only

Left face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Left)
BlockFace Right read-only

Right face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Right)
BlockFace Top read-only

Top face.

local blockToAdd = Block(1) -- block with PaletteIndex == 1
someMutableShape:GetBlock(4,5,6):AddNeighbor(blockToAdd, BlockFace.Top)