# Vectors for Maker Projects

Use vectors as arrows with size and direction so game movement, sensor orientation, force sketches, and layout offsets become inspectable.

## Outcome
Describe a movement, force, sensor direction, or offset as a vector and explain what the numbers mean.

## Safe first step
Draw the arrow first: start point, direction, length, and units before writing formulas or code.

## Ladder steps
### 1. Draw the arrow
A vector should start as a visual thing: from here to there, with a direction and a size.

Check: You can point to the start, direction, and length before naming coordinates.

### 2. Name the components
The x, y, and z numbers describe how far the arrow moves along each axis.

Check: You can explain why changing one component changes the drawing.

### 3. Separate direction from length
Normalization keeps direction while changing length to one, which helps movement and sensors stay consistent.

Check: A unit vector points the same way but has length 1.

### 4. Attach units to the problem
A game velocity, wiring offset, load direction, and shop measurement can all use vectors, but the units decide what the numbers mean.

Check: Your note says pixels, meters, volts-per-reading, pounds, or inches where needed.

## Examples
### Find the arrow from one point to another
```sh
direction = target_position - current_position
```
Expected signal: The result points from the current position toward the target

### Keep direction but remove distance
```sh
unit_direction = direction.normalized()
```
Expected signal: The vector length becomes 1 while the heading stays the same

### Turn a known direction and known size into one vector
```sh
force_arrow = magnitude * unit_direction
```
Expected signal: The vector now has the desired length in the chosen units

## Common traps
- Treating a vector as just two random numbers.
- Normalizing a zero-length vector without checking it.
- Mixing pixels, meters, and real measurements in one note.

## Practice task
Sketch a small game object moving toward a target. Label current position, target position, direction vector, length, and unit direction.

## Next steps
- Use dot product to answer facing questions.
- Use trig when the project starts from an angle.
- Use interpolation when motion needs to change smoothly.

## Related
- [Apply vectors in a first game loop](/learn/godot-first-playable-loop/)
- [Use direction thinking with sensor placement](/learn/microcontroller-wiring-first-checks/)
- [Game maker routes](/topics/games/)
- [Electronics and controls](/topics/electronics/)

## Obsidian backlinks

Use these wiki links to connect this note inside a local maker vault:

- [[TopicLadder]]
- [[Maker Learning]]
- [[Vectors for Maker Projects]]
- [[Maker Math]]
- [[math]]
- [[applied-foundation]]
- [[Draw the arrow]]
- [[Name the components]]
- [[Separate direction from length]]
- [[Attach units to the problem]]
- [[Apply vectors in a first game loop]]
- [[Use direction thinking with sensor placement]]

## Source and next routes

Source: https://topicladder.com/learn/vectors-for-maker-projects/

- [Apply vectors in a first game loop](/learn/godot-first-playable-loop/)
- [Use direction thinking with sensor placement](/learn/microcontroller-wiring-first-checks/)
- [Game maker routes](/topics/games/)
- [Electronics and controls](/topics/electronics/)
