I've been trying to read EYEPOINT DYNAMIC OFFSET data from FSX using SimConnect and not having any luck. It just doesn't generate any events. (Other things do so I know my code and SimConnect is working.)
After connecting I do:
hr = SimConnect_AddToDataDefinition(mhSimConnect, DEFINITION_1, "EYEPOINT DYNAMIC OFFSET", "");
To request it I do:
hr = SimConnect_RequestDataOnSimObject(mhSimConnect, REQUEST_1, DEFINITION_1, SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME, 0, 0, 0, 0);
Then to receive it in my callback:
switch(pObjData->dwRequestID)
{
case REQUEST_1:
{
struct SIMCONNECT_DATA_XYZ *pS = (struct SIMCONNECT_DATA_XYZ*)&pObjData->dwData;
...
...
break;
}
...
...
Yet this event never gets called. Any idea what's wrong?
All I really want to do is run a check every frame to try and determine whether the currently focused window is inside or outside the aircraft or not, so I can direct SetCamera6Dof commands to the VC only and suspend them if the user changes the view.
Thanks,
Si
After connecting I do:
hr = SimConnect_AddToDataDefinition(mhSimConnect, DEFINITION_1, "EYEPOINT DYNAMIC OFFSET", "");
To request it I do:
hr = SimConnect_RequestDataOnSimObject(mhSimConnect, REQUEST_1, DEFINITION_1, SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME, 0, 0, 0, 0);
Then to receive it in my callback:
switch(pObjData->dwRequestID)
{
case REQUEST_1:
{
struct SIMCONNECT_DATA_XYZ *pS = (struct SIMCONNECT_DATA_XYZ*)&pObjData->dwData;
...
...
break;
}
...
...
Yet this event never gets called. Any idea what's wrong?
All I really want to do is run a check every frame to try and determine whether the currently focused window is inside or outside the aircraft or not, so I can direct SetCamera6Dof commands to the VC only and suspend them if the user changes the view.
Thanks,
Si

