• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS Triggering Hangar door animation in SimObject by distance?

Messages
218
Country
canada
I'm trying to figure out how to trigger hangar door animation based on distance. The idea is to play the opening animation once when inside or close to the hangar, and play the closing animation when farther away.
I was able to create a normal animation with scenery objects, and a flag waving in the wind based on wind direction. But I can't find anywhere how you can trigger things by distance...

Anybody knows how to do something like that?

I also have an idea how this could work with a simple object with different model LODs, but I'm not sure if it will work:

1. LOD2 (very far) - Simple low-poly hangar model, doors stay OPEN, no animation: this has a reason, for animation flow - it doesn't matter far away if doors are open.
2. LOD1 (closer and clearly visible) - animation OPEN->CLOSED, no loop.
3. LOD0 (large size on screen, maybe 100m away or so) - animation CLOSED->OPEN, no loop.

That way here's what's going to happen:

- When you spawn inside the hangar, LOD0 loads with doors closed, doors will slowly open and stay open.
- When you taxi away, the doors close.
- If you start at a gate, away from the hangar, LOD1 loads and you may see the open doors closing, a sign of an active life in a busy airport.
- If you taxi close by to the hangar by on the way to the runway before takeoff or after landing - LOD0 loads and you see the doors opening again and close again later when you are away and LOD1 loads. Busy airport, why not?
- When you are approaching for landing, far away doors are open (LOD2) which is OK because they could be open for a long while in a real airport, and it's really far away. When you are closer you may see that hangar doors are closing (LOD1), creating the appearance of some life at the airport. By the time you land, doors are closed.
- When taxi on closest taxiway by the way to the gates, or approach the hangar directly, LOD0 loads and the closed doors open and stay open, so you can taxi inside.

No interaction of any sort is necessary and it all behaves in a plausible manner.

The only inconsistency would be when you are taking off, and LOD1 is changing to LOD2, and the doors would jump from closed to open, but the airport will be behind you, and who is looking back when taking off? But the time you engage autopilot and can watch the ground - you are likely far enough for LOD2, and if you are just doing the pattern, they will stay on LOD1. Yes, AI aircraft will have problem with that, but I guess if doors use collision material, they should not go through? Most will be at the gates anyway...

That's the idea, but will it work with a simple object? Will the corresponding animation load each time the new LOD is loaded, play once an stop? What if LOD will load again in the same session, after another LOD was loaded, will the animation play again? I yes - that's all I need. If not - I need to figure out how to do a SimObject with animation triggered by distance...
 
Messages
176
Country
germany
Hey Roman, I'm trying to have this open hangar feature for days now, but failed. Could You pls tell me how you did it? That would be great.
The idea helping you with your question is to have a look to the behavior/animation of a marschall simobject. When you are approaching a marschall at a parking position the system knows the distance and direction of the plane and that's done by the behaviour definition in an xml file in a basic store directory, Have You checked that out already?
Regards Guido
 
Messages
176
Country
germany
You'll find the marschall behaviour here in case you haven't looked for it yourself \\MSFSPackages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\animation.xml
 
Messages
218
Country
canada
How I did what? I didn't do the hangar doors object yet, I'm researching on how to approach it... I did the flag, and that's described in a topic on this forum.
 
Messages
176
Country
germany
How I did what? I didn't do the hangar doors object yet, I'm researching on how to approach it... I did the flag, and that's described in a topic on this forum.
Sorry but I understood, that You have managed to have a hangar door opened by using a flag, haven't You?
 
Messages
176
Country
germany
My blender hangar is able open 1 of its doors. But when I export it to MSFS, the scenery on the hangar airport is doing nothing at all, just showing my hangar with the opened door which is a the 0 keyframe. On keyframe 150 the doors are closed.
I also had this threat about it before: https://www.fsdeveloper.com/forum/posts/873294/
 

Attachments

  • Hangar_NW2Lo2.zip
    31.2 KB · Views: 59
Last edited:
Messages
218
Country
canada
Sorry but I understood, that You have managed to have a hangar door opened by using a flag, haven't You?
No, I meant I created a flag simobject that waves in the wind, so I can create a simobject, I just don't know how to manage the proximity trigger if it can be managed at all.
So what is your flag doing? Just a random loop behaviour?
My flag is waving in the wind (that's one animation), and it also rotates in the wind direction (second animation - and that's why it's a simobject), so it's always waving in the right direction, like a windsock.

Have Yo used blender or 3DS Max for modeling?
Blender
 
Messages
176
Country
germany
Hi, did You make any progress in your open door project? I've defined my hangar as a simobject now trying a different approach. As a sample I used the animated flag. But have not been successful yet.
 
Messages
116
Country
italy
what do you think about opening it with the taxi_lights?
If the taxi lights are on, the hangar opens
if the taxi lights are off the hangar remains closed

can it be right to write the condition in this way?
HTML:
<Code> (A:LIGHT TAXI ON, Bool) 1 = if{ 1 } els{ 0 } </Code>

LIGHT TAXI ON is a boolean
Screenshot 2021-02-11 173606.png
 
Messages
176
Country
germany
Well sounds reasonable, I thought about the L:XMLVAR_YokeHidden1 which is the hide funtionality of the yoke in the cockpit. I'll give it a shot.
 
Messages
116
Country
italy
yes, the principle is the same.
we just need to find a way to write it correctly.
After that, one uses the Boolean of his choice to open the hangar ;)
 
Messages
218
Country
canada
Goode idea, if it works. I haven't made any progress yet BTW. Yoke hidden is a bit clunky, and not convenient in VR. But taxi lights is feasible option.
 
Messages
176
Country
germany
Goode idea, if it works. I haven't made any progress yet BTW. Yoke hidden is a bit clunky, and not convenient in VR. But taxi lights is feasible option.
Approaching a solution I guess. Have to solve this one:
Invalid script (command not found - perhaps a space is missing or there's an extra space?): "="
Need units for (A:LIGHT TAXI ON)
 
Top