BUG on SimConnect_CreateEffect
Posted: Sat Oct 21, 2017 10:10 pm
Hello,
I think there is a bug with the managed code for the function SimConnect_CreateEffect and SIMCONNECT_RECV_ATTACHPOINT_DATA with the required units used for the location of the effects, in accordance with your current documentation:
HRESULT SimConnect_CreateEffect(
HANDLE hSimConnect,
const char* effectName,
SIMCONNECT_DATA_LATLONALT TargetPosition
SIMCONNECT_DATA_XYZ offset
BOOL attachToSimObject
DWORD dwObjectID
SIMCONNECT_DATA_REQUEST_ID RequestID
int effectDuration
);
You are supposed to pass a SIMCONNECT_DATA_XYZ structure, my understanding is that this structure should hold the position in feet's (same as the Aircraft.cfg for landing lights locations, etc.) however if you pass a SIMCONNECT_DATA_XYZ with values in feet's the effect is created in the wrong position and attaches incorrectly in relation to desired location Attachment point coded inside the aircraft model, if I pass the an XYZ in meters then the effect attaches correctly as desired in relation to the Attachment point.
Given the fact that the function SIMCONNECT_RECV_ATTACHPOINT_DATA returns an structure SIMCONNECT_DATA_XYZ with data the data in feet's, it seems to me that either the function to create effects is expecting the wrong units or the function SIMCONNECT_RECV_ATTACHPOINT_DATA should be return an structure with data in meters instead.
Can this be corrected or at least clarified on the SDK documentation?
Best Regards,
Simbol
I think there is a bug with the managed code for the function SimConnect_CreateEffect and SIMCONNECT_RECV_ATTACHPOINT_DATA with the required units used for the location of the effects, in accordance with your current documentation:
HRESULT SimConnect_CreateEffect(
HANDLE hSimConnect,
const char* effectName,
SIMCONNECT_DATA_LATLONALT TargetPosition
SIMCONNECT_DATA_XYZ offset
BOOL attachToSimObject
DWORD dwObjectID
SIMCONNECT_DATA_REQUEST_ID RequestID
int effectDuration
);
You are supposed to pass a SIMCONNECT_DATA_XYZ structure, my understanding is that this structure should hold the position in feet's (same as the Aircraft.cfg for landing lights locations, etc.) however if you pass a SIMCONNECT_DATA_XYZ with values in feet's the effect is created in the wrong position and attaches incorrectly in relation to desired location Attachment point coded inside the aircraft model, if I pass the an XYZ in meters then the effect attaches correctly as desired in relation to the Attachment point.
Given the fact that the function SIMCONNECT_RECV_ATTACHPOINT_DATA returns an structure SIMCONNECT_DATA_XYZ with data the data in feet's, it seems to me that either the function to create effects is expecting the wrong units or the function SIMCONNECT_RECV_ATTACHPOINT_DATA should be return an structure with data in meters instead.
Can this be corrected or at least clarified on the SDK documentation?
Best Regards,
Simbol