Compass

Compass in the player's hand

*The multiplayer update compass recipe needs to be added to this page.*

The compass is a tool (note that its type is actually "material" not "tool") that display's the player's position and orientation in 4D space.

## Crafting

### Recipes

Since the multiplayer update, the compass recipe has been updated to use Solenoid Bars.

#### Original

Result:*

### Used in

#### Alidade

Result:*

## Usage

### Coordinates

In *4D Miner*, world coordinates are represented by four numbers, which are labeled x, y, z, and w. All coordinates are centered around the world origin (x: 0, y: 0, z: 0, w: 0).

Each number in a set of coordinates represents a distance along one of the four axes:

* The x-axis represents the distance east (positive) or west (negative) from the world origin.
* The y-axis represents the distance above (positive) or below (negative) the world origin, which is at the bottom of the world.
* The z-axis represents the distance south (positive) or north (negative) from the world origin.
* The w-axis is the game's 4th spatial dimension and it represents the distance anth (positive) or kenth (negative) from the world origin. "Anth" and "kenth" are not official terms, however.

When the compass is in the player's active hotbar slot, or "hand," the player's coordinates (x, y, z, w) will be displayed near the bottom-right corner of the screen.

### Orientation

The compass displays the player's 4D orientation in two different ways, both of which ignore the y-axis.

The y-axis is ignored because all of the player's 4D rotations are horizontal. As a result, the player will always know which way "up" is in 4D space, and since humans can only directly visualize three spatial dimensions at a time, the compass can display the player's orientation in 4D space by swapping out the y-component with the w-component.

Frank, the 2D being from the game's tutorial, finds himself in a similar situation. He can only directly visualize two spatial dimensions at a time, but he exists in a world with three spatial dimensions. Frank's 3D rotations are always horizontal, which means he will also always know which way "up" is in 3D space. As a result, Frank's 3D orientation can be visualized in 2D using only a 2D graph, which swaps out the y-component of his orientation with the z-component.

#### Facing direction

The compass shows the direction the player is facing, ignoring the y-component, as a normalized 3D vector, which is displayed near the bottom-right corner of the screen (x, z, w).

The x-axis is blue, with its positive end being at the front, slightly to the right. The z-axis is red, with its positive end being to the left. The w-axis is green, with its positive end being up.

4D rotations are based off of the direction the player is facing (ignoring the y-component), so the player can use this vector to predict how scrolling with the mouse wheel will rotate them in 4D space.

#### Hyperplane visualization

The compass displays a 3D representation of the player's slice of the 4D world.

Since a 2D graph can be used to represent a slice of a 3D world, a 3D graph can be used to represent a slice of a 4D world. The only caveat is that the y-axis must be ignored, but since "up" is always the same direction for the player in both circumstances, this isn't much of an issue.

Because a 2-dimensional slice of a 3D world makes up a 2D plane, a 3-dimensional slice of a 4D world will make up a 3D plane. 3D planes are also known as a 4-dimensional hyperplanes. The player will always exist inside of a hyperplane, but the hyperplane can be rotated in 4D space by scrolling with the mouse wheel.

If the y-axis is ignored, the player's hyperplane can be represented by a 2D plane. This is how the compass displays the player's orientation in 4D space. A 2D plane is shown alongside the x-axis (blue), the z-axis (red), and the w-axis (green) in a cube-shaped frame.

This is essentially a 3D graph, and since it can be displayed in 3D space, it is analogous to a 2D graph being used to represent the orientation of a 2D plane that exists in 3D space, as shown in the above example with Frank.

The horizontal component of the direction the player is facing is represented by a yellow line that lies on the 2D plane. An orange line perpendicular to that yellow line also lies on the 2D plane. If the y-axis is ignored, the orange line can be thought of as the player's 4D "axis of rotation." As the player scrolls, the 2D plane will appear to rotate around the orange line.

A 2-dimensional being with a similar ability will be able to align their 2D plane with either of the horizontal axes that exist in 3D space (that is, the x and z axes). In both cases, the 2D being will only perceive blocks of the same shape, since the slices of all intersecting blocks will be uniform.

In 4D space, there are three three horizontal axes, and therefore three different horizontal planes that each lie perfectly flat against two of them. If the player aligns their hyperplane with one these horizontal planes, the 3D slices of all visible blocks will appear to be regular cubes.

On the other hand, a hyperplane which is not aligned in such a manner will result in different slices of 4D blocks, which will produce a wide variety of different shapes.