Setting The Sim on Ground Flag via Simconnect

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
haroldFDavidson
Posts: 9
Joined: Thu Jun 01, 2017 12:24 am

Setting The Sim on Ground Flag via Simconnect

Post by haroldFDavidson »

Hi all,
Is there a way to Force the sim to be on the ground, regardless of the terrain?

I am currently setting up a project where i have the visuals being handled by another piece of software (with its own terrain) and i'm trying to set the sim to be on the ground (and potentially the normal of the ground, which i can output form my other software)

Alternatively, is there a way to fake it and dynamically create a Ground square underneath the Aircraft at runtime?

Thanks in advance
SJT
Posts: 16
Joined: Sun Jan 27, 2013 6:06 pm

Re: Setting The Sim on Ground Flag via Simconnect

Post by SJT »

If by setting "the sim" on the ground, you are referring to the current vehicle (aircraft, typically) then - yes. It's pretty straightforward. You just need to use a SIMCONNECT_DATA_INITPOSITION structure with the OnGround flag set to 1. You can send the required initposition via a call to SetSimDataOnSimObject . It will then position the vehicle on the ground at that location, irrespective of terrain.
Locked