hkhoanguyen Posted March 5, 2022 Report Posted March 5, 2022 Hello, Is there anyway using fsuipc.net to detect if the current view is in the VC or cabin or outside? Thanks
Paul Henty Posted March 5, 2022 Report Posted March 5, 2022 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
hkhoanguyen Posted March 6, 2022 Author Report Posted March 6, 2022 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!
Paul Henty Posted March 6, 2022 Report Posted March 6, 2022 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now