• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 Placing objects in MSFS by coordinate and rotation...

Messages
1,964
Country
unitedkingdom
I have many models that need to be quickly placed accurately, I see no way using the SDK in MSFS to place my GLTF2 models using the coordinates and rotation information I have for each.

How does one do this?
 
Have you ever opened the .xml created when manually placing objects? It is plain text and
It looks like this

Code:
<SceneryObject lat="50.81626919200955" lon="-0.13686521180959" alt="-2.87002083100133" pitch="-0.000294" bank="0.000294" heading="95.340527" altitudeIsAgl="TRUE" snapToGround="FALSE" snapToNormal="FALSE">
        <LibraryObject name="{EEB99E2B-51DC-466E-B6A6-DBECCF855E58}" scale="1.227991"/>
    </SceneryObject>



All you have to do is write a simple script that takes your position data and fille the required fields
I know someone that placed several millions objects using that method

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
If you are talking about positioning objects dynamically from a simconnect app, the way is using:

SimConnect_AICreateSimulatedObject

Then you also have others API methods to change its position or remove it from the simulator.

D.
 
Unfortunately, the SDK doesn't provide enough examples for some documentation. In particular, the possible parameter types to pass in GraphParams of the fsVFXSpawnInWorld function of the VFX API.
Indeed, I want to guarantee a spawn on the ground, and I was thinking of passing or forcing "SnapToGround" or "SnapToNormal," but nothing is documented.

Even certain SimVars like "PLANE ALT ABOVE GROUND" or "GROUND ALTITUDE" aren't very usable (or I probably don't know how 😁).
C++:
simvarAgl = fsVarsGetAircraftVarId("PLANE ALT ABOVE GROUND");
 
Back
Top