Nerd For Tech
Published in

Nerd For Tech

Game Maths — Dot Product

Recently I’ve been revisiting some useful maths used in game development, starting with Dot Product.

Math:

Purpose:

“How far along Vector A does Vector B sit, when viewed from a right-angled perspective?”

The Technical Stuff:

Dot Product = V1.x * V2.x + V1.y * V2.y + V1.z * V2.z;

float DotProduct = Vector3.Dot(VectorA, VectorB);

A Real Game Example:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.