Jump to content
The simFlight Network Forums

Select Camera using C#


Recommended Posts

Hi, 

I'm looking for a way to activate a pre-defined camera using a tool I'm writing in C#

 

I'd like to activate for example "[CameraDefinition.005]", which is defined in the aircraft.cfg of this aircraft, using a button on my programm

Is this or something similar possible?

 

I'm using P3D 2.5 and the latest FSUIPC Version 4.944

 

 

Best regards

Axel R

Link to comment
Share on other sites

There are standard FSX/P3D controls to set the view to cameras 0 to 9. They are listed in the 'List of FSX and P3D Controls.pdf" document:
 

66851 VIEW_CAMERA_SELECT_1
66852 VIEW_CAMERA_SELECT_2
66853 VIEW_CAMERA_SELECT_3
66854 VIEW_CAMERA_SELECT_4
66855 VIEW_CAMERA_SELECT_5
66856 VIEW_CAMERA_SELECT_6
66857 VIEW_CAMERA_SELECT_7
66858 VIEW_CAMERA_SELECT_8
66859 VIEW_CAMERA_SELECT_9
66860 VIEW_CAMERA_SELECT_0

 

 

You can send these controls via offset 3110. Declare as an 'int' and write-only:

private Offset<int> sendControl = new Offset<int>("SendControl", 0x3110, true);

Then when you want to switch the view assign the new number and process the "SendControl" group: (This example is for camera 5)

sendControl.Value = 66855;
FSUIPCConnection.Process("SendControl");

Paul

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.