Face

A Face 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 Face instances can be used, there's no way to create custom Faces.

Built-in instances

Face Back read-only

Back face.

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

Bottom face.

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

Front face.

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

Left face.

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

Right face.

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

Top face.

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