• 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.

FSX Read FSX Cameras - Static Lib

fs1

Messages
302
Country
argentina
I will be publishing all of my code for FSX which could be interesting maybe for someone.

Here is the code to read the active camera position at any time (XYZ in meters) for FSXA-SP2-SE. Also it reads the 6DOF of the active camera.

There are 4 Libs (MT, MD, MTd, MDd), you just need to link it to your project (there are VS2005 Libs). Other VS20XX Lib versions please PM me!

To use it, include "camera.h" in your project and link the Lib. You need to call the InitCameras function, passing 2 float pointers which will be written every frame with the camera position and the current 6DOF.

C++:
#include "stdafx.h"
#include "camera.h"


float XYZ[3];
float _6DOF[6];

void DLLStart(void)
{
 
    InitCameras(XYZ, _6DOF);

}


void DLLStop(void)
{
    DeInitCameras();

}

When done, do not forget to call DeInitCameras.

I will compile a DLL as well so you can load it dynamically as well.

Camera.PNG


Any feedback is appreciated.

Thanks
 

Attachments

Last edited:
Back
Top