BUG on SimConnect_CreateEffect

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
User avatar
Simbol
Posts: 908
Joined: Thu Sep 07, 2017 10:24 pm
Location: UK
Contact:

BUG on SimConnect_CreateEffect

Post by Simbol »

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
Image
CEO Flight Sim Technologies Ltd
Oficial Website: https://www.FSReborn.com
User avatar
Simbol
Posts: 908
Joined: Thu Sep 07, 2017 10:24 pm
Location: UK
Contact:

Re: BUG on SimConnect_CreateEffect

Post by Simbol »

Hello,

Any chance this information could be confirmed? I would like at least know if the function is working as intended or the unit of measurement will be corrected in the future so I can prepare patches or updates for my Add-on's accordingly.

Best Regards,
Simbol
Image
CEO Flight Sim Technologies Ltd
Oficial Website: https://www.FSReborn.com
Locked