Jump to content
The simFlight Network Forums

Offset detecting View in VC or Cabin or outside


Recommended Posts

7 hours ago, Paul Henty said:

You can try offset 0x8320 (1 byte). The documentation suggests this might not be reliable. I don't know if this works in FSUIPC7.

That would be the only way using FSUIPC.

Paul

Thanks Paul, it works,

however, this offset only can detect two values 2 (in VC) and 4 (Outside) If that is Wingview or inside the plane, it still returns 4.

what I'm looking for is the way to recognize that the current view is "inside" the plane (VC, Wingview or any position that is inside the plane), do you know if there exists a helper like that ?

Ive been searching in Simconnect, what I found is SimConnect_RequestCameraRelative6DOF that can provide X,Y,Z values, I could base on those values to detect if I'm inside the plane, what do you think ? or is there any better idea ? 

Thanks and nice weekend!

Link to comment
Share on other sites

If you're using Simconnect and MSFS there is a SimConnect variable called CAMERA_STATE and one called CAMERA_VIEW_TYPE_AND_INDEX which looks like it will do what you want. You can make a request to John to add these as offsets.

https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Camera_Variables.htm 

I can't see anything like this in the P3D reference though.

Quote

 what I found is SimConnect_RequestCameraRelative6DOF that can provide X,Y,Z values, I could base on those values to detect if I'm inside the plane, what do you think ? 

It depends if all views use the same 'eye-point' or not. The coordinates returned from this function are relative to the eye-point. So if the external view eye-point is different to the cockpit eye-point then you won't be able to do this. If they are the same you would then need to know the rough geometry of the plane to know if you were inside or out.

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.