FSX Read FSX Cameras - Static Lib

#1
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:
Top