Vector Dot Product Calculator (Game Dev)
Enter 2D or 3D vector components to compute the dot product, angle between vectors, and projection — with instant game dev context.
Dimensions
Vector A
Vector B
Angle Visualization
—
Results Click a row to copy
Dot Product (A · B)
—
Angle between A and B
—
cos(θ)
—
Scalar projection of A onto B
—
Scalar projection of B onto A
—
|A| (magnitude)
—
|B| (magnitude)
—
Formula Reference
A · B = Ax*Bx + Ay*By [ + Az*Bz in 3D ]
A · B = |A| |B| cos(θ)
θ = acos( A·B / (|A||B|) )
projBA = (A·B) / |B|
Copied!
Summary
Enter 2D or 3D vector components to compute the dot product, angle between vectors, and projection — with instant game dev context.
How it works
- Choose 2D or 3D mode using the toggle.
- Enter X, Y (and optionally Z) components for Vector A.
- Enter components for Vector B.
- Read the dot product, angle, projections, and relationship label instantly.
- Click any result row to copy its value to your clipboard.
Use cases
- Checking if an enemy is in front of the player using the dot product sign.
- Computing specular lighting intensity between surface normal and light direction.
- Determining if two vectors are perpendicular (dot product = 0).
- Calculating the scalar projection of velocity onto a surface for friction or sliding.
- Blending animations based on the angle between a character forward vector and movement direction.
- Steering AI agents by comparing current heading to the target direction.
- Implementing cone-of-vision field-of-view checks in top-down games.
- Verifying vector math formulas during game physics debugging.
Frequently Asked Questions
Related tools
Last updated: 2026-05-29 ·
Reviewed by Nham Vu