- Messages
- 233
- Country
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...
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...