plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

pilotfg12 avatar image
pilotfg12 asked WombiiActual edited

LightRow Axes X/Y/Z

Maybe I'm missing something but I'm pulling my hair out with the axis configuration for a lightrow. After a lot of fiddling (and reading the SDK) I've finally figured out that for some unknown reason the FS convention is XZ on the ground plane (instead of XY) and the Y axis is the vertical axis (instead of Z... why?)


Now I'm trying to orient my approach lights to be angled approximately 4.5 degrees up from horizontal, but for the life of me I cannot figure out what the rotation axes definitions are. I have tried everything, from 45 degree increments, flipping orientations by 180 degrees, but I cannot figure out how these axes are defined (specifically the rotational axes).


The convention I'm used to is X being left/right, Y being forward/backward, and Z being up/down. But even taking into account the interesting definition of axes in the SDK, where is 0/0/0 in direction even pointing? If I put in 0/0/90 my lightrow looks like this:

lr1.png


Makes sense so far. According to the SDK definition:


se-viewmenu-2-handles.png


So now, you would assume if I set the Y to 180 and keep X 0 and Z at 90, the unidirectional light would face away from the camera. Nope:

lr2.png


What is going on here?! Am I really missing something? How is setting Y to 180 degrees not reversing the direction of these lights?

scenerydefaultlight
lr1.png (647.0 KiB)
lr2.png (603.9 KiB)
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

WombiiActual avatar image
WombiiActual answered WombiiActual edited

My post here: Light presets: directional variables for custom VASI lights. - MSFS DevSupport (flightsimulator.com) Never got a response so I don't know if it's a bug or if the docs are wrong, but it's not angles in degrees. It's xyz coordinates of a point in the middle of the beam. Think of it like tying a rope to the lamp and pulling it in a direction.

This means 1/1/1 is the same direction as 5/5/5, and it's a 45 degree angle on both the vertical and horizontal plane.

Edit to add from my linked post:

UNIDIRECTIONAL:

  • Light cone is about 90 degrees wide
  • Position is position in meter, Y/Z/X with X along light row and Z being up.
  • Direction is position in meter of a point in the center of the light cone. Y/Z/X with X along light row.

To get a 4.5 degree up angle on the light you probably want something like 1 / 0.079 / 0. If the light is pointing backwards replace 1 with -1. To calculate the elevation use tan(4.5)=0.079.

(Looking at the SDK axis diagram I see that it would indeed actually be XYZ with z along light row and Y being elevation, but the coordinate instead of degrees part of my post is correct)

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Dav3.- avatar image
Dav3.- answered

Same here... It seems that something is not working properly

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.