Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Elevator Animation Based on Hydraulic Pressure SOLVED!

Featured Replies

  • Moderator

Rather than bury this in the other thread, I thought I'd describe the entire process here.Thanks go to Lou "Firestriker" for providing the idea and the hints needed, as well as a "test model" which provided the needed heirarchy already set up. His XML code worked, but didn't work as well as I'd hoped. After a lot of T&E, I have finally managed to crack this particular nut.This is the parts heirarchy:The "dummy nodes" are tiny cubes that're hidden within the elevator(s) and have their pivots set for the correct axis of rotation. IMPORTANT NOTE: these MUST be real geometry! You cannot use GMax "dummy nodes" that have no geometry, otherwise the animation is stripped out during the compile!The two nodes control visibility.The node is key-frame animated using 200 frames, and positionally rotated based on the relative hydraulic pressure.l_elevator and elevator_drooped are the visible parts and are identical twins... :) Because is linked to the parent , it will 'rotate' along with the parent. l_elevator will of course simply respond to the "FS stock animation."I suppose that I should also go nuts and similarly animate the ailerons, and VC yoke as well.Of course, as one of my colleagues pointed out, some a/c have control locks to prevent the control surfaces from moving, so this needs to be researched for accuracy!But, since I've now got the correct code entered into the xml_parts file, I'll never have to spend time working it out again, but simply remember to use the correct "part names!" :)Now we get to the real "MEAT" of the process, the dreaded XML code in the makemdl.parts.xml file: ac_cond_eng_slow(A:GENERAL ENG PCT MAX RPM:1, percent) 25ac_cond_eng_fast(A:GENERAL ENG PCT MAX RPM:1, percent) 25elevator_droopENG1 HYDRAULIC PRESSUREpsi2600The first two are the controllers for visibility. The third entry is the 'heart' of the process, since it will slowly cause the elevator to rise to 'flight normal position' then politely disappear once the engine starts. The rise is approximately 6 seconds, based on 200 key-frames of animation.On engine shutdown, the hydraulic pressure slowly bleeds off, and the elevator takes about 30 seconds to completely 'droop' to its lowest position.Also, the code for hydraulic pressure is based on a max value of 3,000 as entered in the aircraft.cfg file, so may need adjusting based on your a/c's actual .cfg entry.As Finn N. would say, "All in good fun!" :)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Commercial Member

Bill,Awesome, grats on getting that working. I'm sure many of us can benefit from using similar techniques in our own projects.I myself have yet to begin doing any parts animation, so any examples are good examples:)--Jon

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.