Jump to content

Sign in to follow this  
fs1

Read FSX Cameras - Static Lib

Recommended Posts

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.

 



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

camera-png.47049

You can download the code here

Any feedback is appreciated!

Thanks


 

 

Edited by fs1

Federico Sucari

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    21%
    $5,415.00 of $25,000.00 Donate Now
×
×
  • Create New...