On screen text display in VR

MicMac44
Posts: 7
Joined: Fri Feb 15, 2019 5:48 pm

On screen text display in VR

Postby MicMac44 » Tue Mar 12, 2019 6:35 pm

Has anyone found a way to display text on-screen that is viewable in VR similar to the SimDirector's "OnScreenText" Object? I know there are a few SimConnect_Text option but they don't seem to be viewable in VR nor can I control the offset.

User avatar
Kayla Kinzel
Lockheed Martin
Posts: 1176
Joined: Mon Aug 01, 2016 5:59 pm

Re: On screen text display in VR

Postby Kayla Kinzel » Wed Mar 13, 2019 11:07 am

Hello,

You should be able to use the DrawText3D function in the PDK through the ObjectRenderer service.
https://www.prepar3d.com/SDKv4/sdk/pdk_ ... derer_v440

Regards,
Kayla
Prepar3D® Software Engineer

MicMac44
Posts: 7
Joined: Fri Feb 15, 2019 5:48 pm

Re: On screen text display in VR

Postby MicMac44 » Thu Mar 14, 2019 7:16 pm

Hello,

You should be able to use the DrawText3D function in the PDK through the ObjectRenderer service.
https://www.prepar3d.com/SDKv4/sdk/pdk_ ... derer_v440

Regards,
Kayla
Excellent! Thank you! I'm not familiar with the PDK so I'm working through it now. The idea is to grab the FCS targeting info and other weapon system info for easy display in VR. Can the PDK grab this info on the USER ship?

MicMac44
Posts: 7
Joined: Fri Feb 15, 2019 5:48 pm

Re: On screen text display in VR

Postby MicMac44 » Mon Mar 18, 2019 4:14 pm

Is there an example of passing data from a SimConnect project to a PDK project? I have the text rendering but I have not been able to access the user's FCS target info nor any weapon info. I've seen a few posts mentioning you can use SimConnect_SetClientData and then have your PDK read in that client data. Is there an example of this?

Clifton Crane
Lockheed Martin
Posts: 925
Joined: Tue Sep 25, 2012 2:34 pm

Re: On screen text display in VR

Postby Clifton Crane » Tue Mar 19, 2019 6:11 pm

Hi MicMac,

A PDK plugin is capable of creating a SimConnect instance, however this shouldn't be necessary. You can use the PDK's ISimObjectManager and IBaseObject interfaces to get data from the user object.

You first need to QueryService the PDK to get the ISimObjectManager. Once you have the ISimObjectManager you can call GetUserObject to get the user's IBaseObject interface. Using the IBaseObject interface you can call GetProperty to get the FCS information.

If you search the SDK Samples solution for "GetUserObject", the TargetingPodSample would be a good sample to look at.
Clifton Crane
Prepar3D® Software Engineer

MicMac44
Posts: 7
Joined: Fri Feb 15, 2019 5:48 pm

Re: On screen text display in VR

Postby MicMac44 » Tue Mar 19, 2019 7:29 pm

You first need to QueryService the PDK to get the ISimObjectManager. Once you have the ISimObjectManager you can call GetUserObject to get the user's IBaseObject interface. Using the IBaseObject interface you can call GetProperty to get the FCS information.
I should have responded earlier! I figured out how to access the FCS through the PDK. It's working perfectly.

I am still wondering how to send data. I have certain aircraft from another simulation being transmitted in DIS. I would like to grab the location of those DIS entities. My idea was to have a SimConnect plug-in grab that relevant information on certain DIS entities and then have the PDK grab that information from the SimConnect instance.

I am able to get the information in SimConnect, the only part I'm missing is being able to send it to my PDK.


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 4 guests