plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

68ponyGT avatar image
68ponyGT asked 68ponyGT commented

SimConnect_AICreateSimulatedObject; StaticObject doesn't orient to terrain, GroundVehicle drives away

I have created stationary simobject vehicles that are spawned with SimConnect_AICreateSimulatedObject. These objects are not meant to move and have no animations. I used simobject category StaticObject but the vehicles will not orient themselves to the terrain (partially buried/floating). If I use GroundVehicle they will align to terrain but move away in fwd/rev. Is there a way to park a spawned GroundVehicle or preferably have StaticObject "snap to normal" with Simconnect?

Any help appreciated

simconnect
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Kaiii3 avatar image
Kaiii3 answered 68ponyGT edited

Give it a parking break and set it via SimConnect, that should stop if from moving.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thanks, that sounds logical.

Can someone point me in the right direction for adding a parking brake to GroundVehicle simobject? I've looked through sdk documentation for Ground Vehicle config definitions/examples but don't see anything for parking brake. Is this something that needs to go in the model .xml?

Thanks in advance

0 Likes 0 ·
virtuali avatar image
virtuali answered 68ponyGT commented

If the vehicles are not meant to move, send their variable "SIM DISABLED" to 1, so you'll turn off their internal simulation, which will be better for fps compared to set their brakes.

In addition to that, unless you have specific reasons to create them through Simconnect, it's definitely easier to just add them to the scenery with the Scenery Editor, which DOES allow SimObjects to be placed as "static", with no need to use Simconnect, as it was with FSX/P3D.

Just set the "snapToGround" to TRUE, with an altitude of 0, so they'll stay on terrain.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thanks I will try this, I think this is what I'm looking for. We are using this to generate dynamic scenes so its not possible to use scenery. The StaticObject works great in scenery with snap to ground and snap to normal.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.