Well, I had a look at the TransmitClientEvent() function and I looked at the SDK but I still don't understand all of the arguments for resetting the camera eye point.
The line I've come up with so far (shown at the bottom) gives me an error in the EYEPOINT_RESET argument: does not exist in the current context.
I'm using C# so the SDK examples don't map one to one. I guess by choosing to use C# vs C++ as the examples are written in, I've really got an up hill battle in getting my app to work!
The SDK says:
TransmitClientEvent()
Parameters
hSimConnect
[in] Handle to a SimConnect object.
ObjectID
[in] Specifies the ID of the server defined object. If this parameter is set to
SIMCONNECT_OBJECT_ID_USER, then the transmitted event will be sent to the other clients in priority order. If this parameters contains another object ID, then the event will be sent direct to that sim-object, and no other clients will receive it.
EventID
[in] Specifies the ID of the client event.
dwData
[in] Double word containing any additional number required by the event. This is often zero. If the event is a
ESP event, then refer to the
Event IDs document for information on this additional value. If the event is a custom event, then any value put in this parameter will be available to the clients that receive the event.
GroupID
[in] The default behavior is that this specifies the GroupID of the event. The SimConnect server will use the priority of this group to send the message to all clients with a lower priority. To receive the event notification other SimConnect clients must have subscribed to receive the event. See the explanation of
SimConnect Priorities. The exception to the default behavior is set by the
SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY flag, described below.
Flags
[in] One or more of the following flags:
SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY
Here is my line but I'm not sure if the first, second or third arguments are correct. I'm pretty sure the last 3 arguments are correct:
simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, 0, SimConnect.EYEPOINT_RESET, 0, SimConnect.SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);