Unity Dots Example: A Visual Guide to Connected Design

Robert Jul 13, 2026

When it comes to game development, Unity is often the go-to engine due to its versatility, robust features, and extensive community support. One of the most fundamental concepts in Unity is that of dots, or vectors, which are integral to positioning, movement, and physics in 2D and 3D spaces. Let's delve into some examples of working with Unity dots to enhance your understanding of this crucial concept.

Unity
Unity

Before we dive into specific examples, let's briefly recap what Unity dots are. In Unity, a dot or vector is a mathematical representation of a point in 2D or 3D space. It consists of three components: x (horizontal), y (vertical), and z (depth). This x, y, z format is represented in Unity using the Vector3 class for 3D and Vector2 for 2D.

a painting with people walking in front of an orange and red swirl pattern on the ground
a painting with people walking in front of an orange and red swirl pattern on the ground

Manipulating Dots in Unity 3D

In 3D game development, Vector3 is the primary class used to represent and manipulate dots. Let's explore two common operations with Vector3: adding velocities and calculating distance.

an abstract black and white pattern with dots in the shape of a snowflake
an abstract black and white pattern with dots in the shape of a snowflake

Combining Velocities

Suppose you're creating a spaceship game where the player can move in multiple directions. To combine the player's horizontal (X) and vertical (Z) velocities for smooth, diagonal movement:

a black and white poster with red dot on the center, in front of a light gray background
a black and white poster with red dot on the center, in front of a light gray background

`Vector3 velocity = new Vector3(xVelocity, 0, zVelocity);`

Calculating Distance

To calculate the distance between two points (e.g., the player and a target), use the `magnitude` property of Vector3:

a black and white poster with circles on it
a black and white poster with circles on it

`float distance = (target.transform.position - player.transform.position).magnitude;`

Unity Dots in 2D Game Development

In 2D games, Vector2 is the primary class for working with dots. Let's look at two common use cases: calculating direction and normalizing vectors.

Proximity 3
Proximity 3

Calculating Direction

To find the direction from one point to another (e.g., the player to an enemy), subtract the enemy's position from the player's position:

Ms Maggie Mo's Aborigine dot painting example of Unity Aboriginal Art Worksheet, 7 Teachings Aboriginal Art, Gabarnmung Aboriginal Art Meaning, Aboriginal Art Lesson Plan, Ilyarnayt Aboriginal Art Meaning, Aboriginal Art Education Poster, Teaching Aboriginal Culture Through Art, Aboriginal Art Classroom Ideas, Aboriginal Art Project
Ms Maggie Mo's Aborigine dot painting example of Unity Aboriginal Art Worksheet, 7 Teachings Aboriginal Art, Gabarnmung Aboriginal Art Meaning, Aboriginal Art Lesson Plan, Ilyarnayt Aboriginal Art Meaning, Aboriginal Art Education Poster, Teaching Aboriginal Culture Through Art, Aboriginal Art Classroom Ideas, Aboriginal Art Project
PROXIMITY
PROXIMITY
two trees are standing next to each other
two trees are standing next to each other
good Continuation
good Continuation
a bunch of different colored buttons sitting on top of a black table next to a laptop
a bunch of different colored buttons sitting on top of a black table next to a laptop
Dot 2
Dot 2
Dot 1
Dot 1
black and white polka dots are arranged in a square
black and white polka dots are arranged in a square
a black and white image of eight dots arranged in a circle on a white background
a black and white image of eight dots arranged in a circle on a white background
a black and white image of eight dots
a black and white image of eight dots
the dotted dots are black and white, but they appear to be in different directions
the dotted dots are black and white, but they appear to be in different directions
Unity stock image. Image of landscape, abstract, together - 8808167
Unity stock image. Image of landscape, abstract, together - 8808167
@QuantumFeedback | Linktree
@QuantumFeedback | Linktree
"Unity" by Emily Lake
"Unity" by Emily Lake
BILLABONG - D&G - and more - Jonathan Calugi
BILLABONG - D&G - and more - Jonathan Calugi
Dot
Dot
black dots are arranged on a white background
black dots are arranged on a white background
Proximity
Proximity
an image of a person's hand in the center of a circle with dots on it
an image of a person's hand in the center of a circle with dots on it
an abstract black and white dot pattern
an abstract black and white dot pattern

`Vector2 direction = player.position - enemy.position;`

Normalizing Vectors

To make an object move at a constant speed, regardless of its direction and distance to a target, normalize the direction vector by dividing it by its `magnitude`:

`Vector2 directionNormalized = (player.position - enemy.position).normalized;`

Mastering Unity dots is vital for creating engaging and responsive game experiences. Experiment with these examples, and as you delve deeper into Unity, you'll find numerous other applications of vectors, from calculating angles and working with rays to manipulating transforms and rigid bodies. Happy coding!