# Point, arrow and rotation notes

A lot of moving around, placing and aiming can be done if you know simple vector math, rules for rotations/quaternions and can use some of the built-ins. Each problem is different -- this is hopefully enough theory that you can figure out most things, or understand someone else's vector/rotation code well enough to modify it.

This assumes you have a very basic knowledge of coding and know simple Unity3D navigation. Each section is only a few pages long.

1. Basic terms pdf
2. Point and offset math pdf
3. Local/global axes pdf
4. Direction & Magnitude pdf
5. Rotation pdf
6. Combining rotations pdf
7. Moving points and rotations pdf
8. More misc math pdf
9. Local space trick pdf
10. Examples pdf

Links to each chapter as htmls

## Contents

1.2.2 Moving ourself
1.2.3 Averaging points
1.3 Math review

2.1 Local axes

2.4 Childing
2.4.1 SetParent notes
2.5 Errors

3.1.1 Direction
3.1.2 Normalized direction

4.1 Quaternions

4.2.3 Look in a direction
4.2.4 FromToRotation

4.3.2 dot-eulerAngles

6.1.1 MoveTowards
6.1.2 Lerp

6.2.1 Spinning an arrow
6.2.2 Moving a rotation
6.2.3 Rotation lerp

7.0.1 Finding angles
7.0.2 Cross Product
7.0.3 Normals
7.0.4 Reflect
7.0.5 Opposite of an angle
7.0.6 Square magnitude

7.1.2 atan2
7.1.3 dot product
7.1.4 Rotation matrixes

8.1 Local Space

9.4 Orbit camera

Comments. There's also a post in the Unity Teaching&Learning Forum.

Jan 10, 2017: in Rotation chapter; rewrite the Quaternion sections , fixes and small grammar changes elsewhere.

Nov, 2018: re-edit entire thing. Redo first rotation chapter; added connect-cubes to misc examples. Added entire-pdf-with-TOC and html chapters (htlatex can do that. Who knew? Well, everyone except me.)