summaryrefslogtreecommitdiff
path: root/NOTES
blob: 8f2f2049e5e44b60508b664d84dd7e6a06fd802f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
this may not be what actually happens, but this is what I'd like:

x and z are floor.

y is up and down.

yr rotation 0 is facing east. because that's what rotation 0 is in cartesian coordinates.
yr is yaw
xr is pitch
zr is roll

the rotations need to be within the range: 0 <= r < 360 (so modulo 360 should work)

minimap: view from above (how it actually is in hackvr)
          -x?
           |
           |
           |
           |
-z --------+-------- +z
           |
           |
           |
           |
          +x
the reason the minimap has positive x being down is so that camera view at rotation 0 is with
positive x to the right so 2D vector graphics don't need any dimensions flipped

camera view: facing rotation 0 (normal x,y plane that 2d is used to with increasing Z going away from camera.)
          +y
           |
           |
           |
           |
-x --------+-------- +x
           |
           |
           |
           |
          -y

increasing yr causes rotation counter-clockwise on the minimap. (around y axis)


this is what minetest does shit. I don't know if I'll change shit for this or not.

camera angle 0 is north.
north is +Z
south is -Z
west  is -X
east  is +X
up    is +Y
down  is -Y

there is no angle 0 actually. 0 < angle <= 360

I think OpenGL does what hackvr does except flipped Z. negative is away instead of closer.