- Messages
- 19
- Country

i was trying to rotate my windsock which is a SimObject.
But when i use this code to update the heading/direction of the windsock, there is no reaction to the object itself.
This is my code:
DEFINITION_2 is the "Initial Position".
The object is created successfully by another function. But after that, when the wind is changed, it goes successfully into the "updateSimulation" function, i can see all the values of the variables stored in the "SimConnect_SetDataOnSimObject", but it don't react.
What can it be?
But when i use this code to update the heading/direction of the windsock, there is no reaction to the object itself.
This is my code:
Code:
void updateSimulation(double windDirection)
{
HRESULT hr;
double Heading = windDirection;
hr = SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_2, WindsockID, 0, 0, sizeof(Heading), &Heading);
}
DEFINITION_2 is the "Initial Position".
The object is created successfully by another function. But after that, when the wind is changed, it goes successfully into the "updateSimulation" function, i can see all the values of the variables stored in the "SimConnect_SetDataOnSimObject", but it don't react.
What can it be?
