Victim, I don't remember you making any promises. I think I'd said that if you supplied one, I'd include it in the ZRP distribution. You did get me into image editing with GIMP (that is an amazing program), so I'm thankful for that.
On the direction stuff: Here's what I think:
Think right-hand rule: point your right-hand thumb in the positive direction of the axis in question, and the fingers will curl in the positive direction for the rotation. The directive "direction = x, y, z" means apply rotation about the specified axes according to the values. The values x, y, z are in
radians, and there are 2π (2*pi, ~6.28) radians in a circle.
For live NPCs, only the Y-axis is pertinent. To adapt your diagram, this is looking down on the NPC from above:
-------<----- 0 ----^
-------1.57-------4.71
-------v----3.14---->
You can also use negative values, so pointing south would be either 3.14 or -3.14 (+3 or -3 rounding), east would be -1.57 and west -4.71. 1.57079637050629 is the common value used in the
all.spawn file for west-facing objects (e.g., the switch that frees Shaggy), but you might see 1.5722... or 15712... -- and the actual value of pi/2 (90 degrees) is closer to 1.570796327.
You can look at the bottles of vodka in the bandit armory in the
all.spawn file. Only the Y-axis value is changed on the direction to rotate the bottle so that the label faces in realistically different ways.
For objects like anomalies, you can apply rotation to the other axes. This was done for one of the Electro anomalies just south of the SoC Army Warehouses village, but not another, so that one sticks out of the hillside (fixed for next ZRP release). To tilt it so it slants down to the northeast, use a small negative X value like -0.33 and a small positive Z value. Again, think
right-hand rule. Point thumb to east for X value; tilting north would then be negative.
Also, while I think your "look" approach is pretty neat (it enforces the correct direction even when you don't know the rotation scheme), I suspect that the original numbers were misread. Recall that "-9.99e-006" is -0.00000999, or essentially zero. The upright object has a direction that is, for all practical purposes, 0, 0, 0. Meanwhile, I'll have to look at the rotations for the bottle lying on the floor. It might have fallen from a wonky rotation position that was not "upright".
Think how much grief we could have avoided with some good SDK documentation.
](./images/smilies/eusa_wall.gif)