Closed TwinFan closed 3 years ago
Camera Notification Support for 3rd party plugins now works as follows:
sim/multiplayer/camera/tcas_idx
is set to the TCAS index (1..63
) of the aircraft being viewed, or to -1
if that aircraft has no TCAS index, or to 0
if camera view is turned off.sim/multiplayer/camera/modeS_id
is set to the aircraft key, usually the 24bit ICAO transponder code (like 0xAB1234
=11211316
) of the aircraft being viewed, or to 0
if camera view is turned off.sim/multiplayer/camera/tcas_idx
because this dataRef is set last. By the time your notification callback triggers both modeS_id
and tcas_idx
will be updated.0
.modeS_id
and tcas_idx
(in this order) to 0
to indicate that no camera view is on an aircraft; or even update them with aircraft info if your user selects another aircraft inside your plugin. (Note that your callbacks get called even if you set the values...weird twist of the SDK implementation.)LTAPIAircraft::toggleCamera()
, which is called whenever the shared dataRef values change on the current aircraft and even provides you with a pointer to the previous aircraft if any. The LTAPIExample plugin includes an example implementation.LTAPIAircraft::setCameraAc()
and LTAPIConnect::clearCameraInfo()
are available for write operations.Hi, @TwinFan, just a follow-up to say I'm finally able to spend a little time working on the integration of A-Better-Camera with these new datarefs, to implement the camera hand-off feature as requested -- thank you again for adding this!
I must say, at first blush, this design looks right -- and it's hopefully something the Laminar team can adopt and support as well, assuming that was your intent.
Can you confirm whether you've already opened a feature request with Laminar to add native support for these datarefs in an upcoming camera sprint Ben told me they may be working on a few months back? I was otherwise planning to request almost exactly this design -- but at a minimum, I can just point them to this, if that's okay with you.
I.e., was that your intention in putting these datarefs in sim/multiplayer
?
(I would obviously include in the scope of changes I'd recommend to Laminar, the new cslModel
and model
dataref strings you defined for XPMP2 Remote Client as well, which I see you also thoughtfully placed into sim/multiplayer
as well, since the combination are most if not all of what I consider missing features from last year's TCAS-override redesign in X-Plane 11.50.)
Either way, I'll post an update here when I've gotten the integration working or if I find any bugs/issues, if that's okay. (Expect such hopefully within the next day or two of this posting; though I'm not sure when I'll have my next release ready because I have a lot of other changes I want to get in for my next release.)
Thanks again.
Steve
It was FSTramp who suggested usage of shared dataRefs under sim/multiplayer
(more info see the provided link and FSTramp's plugin) with the intend of more widespread use and ultimately adoption by Laminar. I don't know if he ever approached Laminar for follow-up or if even any other plugin followed the approach. I don't intend approaching Laminar on this.
Current Situation / Problem Camera plugins might be interested to know which plane is the current target for an External Camera View in LiveTraffic, e.g. to take over that view.
Suggested Solution
Benefits User can select camera view from within LiveTraffic, e.g. from the Aircraft List, but more powerful external camera plugins provide the actual viewing experience.
Additional context Forum post.