I aim for simple and easy to read with my events if I can. Using arrays to store object info instead of sprites may or may not be better, it just depends on how you want to implement it.
You can sort arrays, but you can also sort sprites with “for each ordered”, just use the stop loop action when loopindex=0 if you just want the closest. Or use a higher number to do stuff with more.
The only time I use an array for terrain is if it’s in a grid formation, in which case a tilemap can work too for 2d. If the terrain is different sizes and whatnot I’d just use sprites.
Not sure I grasp your distance calculation. Would a 3D distance calc work better?
Sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)
I have no technical expertise with the fov behavior. I find behaviors seldom do what I want so I’m more inclined to do stuff from scratch than do things to bend behaviors to my will.
For your last question I think there’s a misunderstanding.
You get the position of objects with the x,y and z expressions as I recall.
The orientXX/Xy...Zz expressions is the orientation matrix of the 3D object. Aka. How it’s rotated.
You can think of those as three vectors.
OrientXX/Y/Z is the left vector of an object
OrientYX/y/z is the up vector of an object
OrientZx/y/z is the forward vector of an object.