Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move camera? #86

Open
viperML opened this issue Mar 12, 2021 · 3 comments
Open

Move camera? #86

viperML opened this issue Mar 12, 2021 · 3 comments

Comments

@viperML
Copy link

viperML commented Mar 12, 2021

Hello,
I am a student from the Polytechnic University of Madrid working in a aerospace project for UAV's.
What I am currently doing is getting simulation data from JSBSim, and wanted to display it using MSFS.

By using this interface I am able to send the aircraft position to the sim, but I also wanted to control the camera.
I have searched all the documentation and property list but cannot find anything to modify any camera parameters (angles, positions and FOV). Maybe this is possible with SimConnect for P3D, but I haven't tried yet.

I have also tried sending input commands with vJoy to the sim, but turns out to be very unpredictable.

Thanks for your time.

@FS2020-USER-TESTER
Copy link

Yes, I investigate this as well and my conclusion was the Sim developers do not provide external camera control interface. The simconnect interface does not seem to be a priority for them. You can send keystrokes but very limited.

There are some interesting discussions in the community about using a pair of components, a custom WASM module, and a external program that feeds custom data.
https://forums.flightsimulator.com/t/communication-between-wasm-plugin-and-external-application/358409/7
Currently this is to feed control panel information and I see no sign that anyone has tried to control the cameras.
But that is the only direction I have seen that offers a solution (unless Asobo team changes their plans regarding simconnect).

@NerdyMuppet
Copy link

I managed to use CameraSetRelative6DOF() by going in the Attributes.py and setting

self.CameraSetRelative6DOF.argtypes = [
			HANDLE,
			c_float,
			c_float,
			c_float,
			c_float,
			c_float,
			c_float
		]

then I simply did this:

sm = SimConnect()
hr = sm.dll.CameraSetRelative6DOF(sm.hSimConnect,0.0, 10.0, -100.0, 0.0, 0.0, 0.0)

This works for me.

@bigsby-exe
Copy link

@NerdyMuppet This is working for me. Thank you for the tip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants