Congratulations!
You have reached the end of Mathematics for Unity3D. Over the course of ten chapters you have built a complete mathematical toolkit one that covers virtually every operation you will encounter in professional Unity3D development. You started with the invisible coordinate systems that underpin every Unity scene and ended with the 4×4 transformation matrices that power the GPU itself. Everything in between vectors, quaternions, tweening, physics forces, raycasting, trigonometry, trajectory prediction forms a coherent, interconnected body of knowledge that you can now apply to real projects.
This conclusion is a moment to look back, consolidate, and then look forward. Take stock of how much ground you have covered, and then use the roadmap in the final pages to plan your next steps.
Full Chapter Recap
Chapter 1 The Basics: Coordinates, Distances, and Clamping
The book opened with the invisible scaffolding of every Unity scene: coordinate spaces. You learned the difference between local space and global (world) space, and why the same position value means completely different things depending on which space you are working in. You explored Unity's Transform component the fundamental building block that gives every GameObject its place in the world and learned to read and write position, rotation, and scale fluently.
From there you moved into the practical arithmetic of game development: computing the distance between two
points with Vector3.Distance, constraining values to valid ranges with
Mathf.Clamp, expressing values as fractions with percentages and normalized ranges, and
linearly interpolating between two values with Mathf.Lerp. These are the invisible tools
that appear in almost every script you will ever write health bars, cooldown timers, proximity checks,
step counters.
Chapter 2 Vectors: The Cornerstone of 3D Programming
Chapter 2 was arguably the most important chapter in the book. Vectors are the language of 3D space, and once you truly understand them, an enormous range of gameplay problems become straightforward. You learned what a vector is a magnitude with a direction and how to use them to move objects, describe velocities, and calculate displacements.
The chapter covered the two essential vector products: the Dot product, which measures alignment between two directions and is the engine behind field-of-view checks, cover detection, and surface shading; and the Cross product, which computes a direction perpendicular to two input vectors and is the foundation of normal calculations, orbital mechanics, and torque.
You learned to normalize vectors to strip away magnitude and work with pure direction
and to project one vector onto another, which is fundamental for sliding movement,
wall collision responses, and slope calculations. You also learned to debug vectors visually with
Debug.DrawRay, turning invisible mathematics into visible arrows in the Scene view.
Chapter 3 Quaternions: Rotations Demystified
Rotations are notoriously confusing in 3D engines. Chapter 3 demystified Unity's
Quaternion type the four-component mathematical object that represents a rotation
without the gimbal lock that plagues Euler angles. You learned that while you should rarely construct
quaternions manually, the Unity API gives you powerful tools to work with them: Quaternion.Euler
for human-readable angles, Quaternion.LookRotation for aiming objects at targets,
Quaternion.Slerp for smooth rotation interpolation, and the multiplication operator for
composing rotations.
Chapter 4 Tweening and Easing: Motion with Personality
Raw linear movement feels mechanical and lifeless. Chapter 4 showed you how to inject personality into motion through easing functions: ease-in (slow start), ease-out (slow finish), ease-in-out (slow at both ends), and custom AnimationCurve shapes that you design directly in the Unity Inspector.
You built a lightweight tweening system in pure C# using coroutines, and then learned to use DOTween the industry-standard tweening library that takes this idea much further with chaining, sequences, callbacks, and a fluent API that makes complex animations surprisingly readable.
Chapters 5 and 6 Physics: Forces, Rigidbodies, and Collisions
Chapters 5 and 6 together covered Unity's physics pipeline from top to bottom. You learned the crucial
difference between Transform-driven motion and physics-driven motion,
and you know when to use each. Key concepts included AddForce and the four force modes,
torque for rotational forces, drag for damping, and the critical importance of running physics code in
FixedUpdate rather than Update.
Chapter 7 Raycasting: Seeing Without Eyes
Raycasting is one of the most versatile techniques in Unity. Chapter 7 taught you to fire invisible rays from any point in any direction and detect whatever they hit first. This single technique powers shooting and projectile hit detection, ground checks and slope detection, line-of-sight for AI enemies, and click-to-interact mechanics. You went beyond simple rays to explore SphereCast, OverlapSphere, and layer masks.
Chapter 8 Trigonometry: Circles, Waves, and Angles
Chapter 8 reunited you with high-school trigonometry in the context of real gameplay problems. You learned that sine and cosine are the languages of circular motion, and that Atan2 is the inverse: given a direction, Atan2 tells you the angle the basis of every aiming system and minimap direction indicator. Beyond circles, you explored sine waves as a general tool for oscillating, pulsing, and wave-based motion.
Chapter 9 Trajectories: Ballistic Physics in Code
Chapter 9 brought together physics, trigonometry, and vectors to solve one of the most compelling problems in game programming: predicting where a projectile will go before you fire it. You learned the closed-form kinematic equations for maximum height, range, and flight time, and how to implement them in C#. You also tackled the reverse problem: given a target position and a fixed launch speed, calculate the angle required to hit it.
Chapter 10 Transformation Matrices: The Math Behind 3D Transforms
The final chapter pulled back the curtain on Unity's Transform component to reveal the 4×4 matrix
underneath. You learned the anatomy of a TRS matrix, explored Unity's Matrix4x4 API, and
saw where matrices shine: GPU instancing with Graphics.DrawMeshInstanced, custom shader
programming in HLSL, and batch point transformations in Unity Jobs.
What You Can Now Build
- Physics-based platformers Rigidbody movement, precise jump arcs, slope handling
- Turret defense games accurate ballistic aiming, trajectory preview arcs, GPU instancing
- Projectile-based games predict arc paths, compute angles to hit moving targets
- Smooth animated UIs DOTween sequences with professional ease curves
- Stealth and AI systems field-of-view detection, line-of-sight, proximity detection
- Physics combat systems explosion forces, ragdoll impulses, directional knockback
- Procedural content placing objects on circles, wave patterns, procedural mesh normals
- Any mechanic that used to seem "too mathematical" because now you have the vocabulary
Next Steps
Practice First Build Small Prototypes
The most effective way to lock in what you have learned is to build things. Pick one concept per week and build a small, self-contained prototype around it. Prototype deliberately: start with the mathematics working on paper, implement the simplest possible version, make it visible, and then iterate.
Data-Oriented Design DOTS and ECS
Unity's Data-Oriented Technology Stack (DOTS) is the future of high-performance Unity development. Many of the techniques you learned here translate directly: matrix math is core to the Jobs and Burst workflow, and the instancing patterns from Chapter 10 are a natural entry point to ECS rendering.
Shader Programming HLSL and ShaderGraph
Chapter 10 gave you a first glimpse of shader programming. The matrix vocabulary you learned maps directly onto HLSL. Start with Unity's ShaderGraph for a node-based introduction, then transition to hand-written HLSL for full control.
AI and Pathfinding
Vectors are central to AI programming. A* pathfinding uses vectors to measure distances and heuristics. Steering behaviors seek, flee, arrive, wander, flocking are pure vector arithmetic. Unity's built-in NavMesh system handles pathfinding automatically, but understanding the underlying mathematics makes you a much better AI programmer.
Resources
- Unity Documentation docs.unity3d.com. The official reference for every class, method, and property mentioned in this book.
- DOTween dotween.demigiant.com. The tweening library used in Chapter 4.
- Indietrainers.com Anthony Kozak's training platform with video courses and source files for this book.
- 3Blue1Brown Essence of Linear Algebra A YouTube series that builds deep geometric intuition for the linear algebra underlying this book.
- Game Programming Patterns by Robert Nystrom Available free online at gameprogrammingpatterns.com.
A Note from the Author
When I first encountered Unity's coordinate system and its quaternions, I was genuinely confused. I copied formulas from Stack Overflow without understanding them. I randomised values until things looked right. I avoided the topics I did not understand and built around them.
This book is the resource I wish I had had at that time. It is built on a simple conviction: the mathematics of game development is not inherently difficult. What makes it feel difficult is learning it in the abstract, disconnected from the concrete problems it solves. When you learn Dot product in the context of a field-of-view check when you see the cone light up in the Scene view as you move a character through it the concept becomes vivid and memorable in a way that no textbook definition can match.
Keep building. Every complex gameplay mechanic, no matter how intimidating it looks when you first encounter it in another game, breaks down into the operations you have learned here. A homing missile is a quaternion Slerp. A grappling hook is a spring force and a distance constraint. A procedural planet is a sphere of vectors and a noise function.
The math is the easy part once you understand it. The hard part the genuinely creative part is coming up with the ideas. You now have the tools. Go make something.
Anthony Kozak, Indietrainers.com
Need help with Unity3D development?
I'm a senior developer with 16+ years experience, including AAA projects at Ubisoft. Let's discuss how I can help with your game or interactive project.
Start a Conversation