Brewster B339 Buffalo and Spitfire Mk1a Project

  • The bendingbodygraphics needs two rigidbodies to work, usually a wing and the fuselage

    The additional transformations are needed for all moving parts because a simple hingedbodygraphics is not bendable and it looks strange if the wing bends but the ailerons and flaps don't. That's why the ailerons and flaps are set up with a graphics_rotation and then also are bendingbodygraphics...

  • Hi Matt

    I'm no expert on this undercarriage stuff, ok on most of the rest, but first observations

    oleo_pneumatic_damper...R0 and R1 Z values look to be reversed, R0 should be smaller than R1

    JointLeftGearFuselage...axis (X0) seems to be pointing more forward than sideways, you are -1.0 0.5 0.0 (ish) should be more 0.0 1.0 0.0, maybe x and y figures reversed

    Might be an idea to remove all the fancy axis numbers and just go with standard whole figures to check it all works. Perhaps these are making things rotate in ways you don't want them too.


  • And also a small comment from me..

    The LeftGearCylinder should be placed that it is able to pull the gear up. It could roughly be something like

                    <[tmvector3d][R0][ -0.080 0.833 -0.345 ]>
                    <[tmvector3d][R1][ -0.080 1.433 -0.544 ]>

    R0 is fixed to the left wing, R1 to the gear. Try to place the cyclinder in a logic way, as it would be in reality (have a look at other planes as example, as the Spitfire doesn't have one). The stroke should be smaller than the distance between the points.


    Edited once, last by kai503 (August 1, 2019 at 7:52 PM).

  • thanks for suggestions guys... I have some idea of what to try next.

    Steve.... I'm still a bit perplexed by what that X0 value is meant to be. What I actually did was take points from the actual hinging axis for the upper part of the undercarriage and use that vector calculator I made to get the values.... which does point forward more than other directions. I'm getting the impression from what you said that the vector maybe needs to be along the line the undercarriage takes when it's up?

    I think ill try and get the gear to retract just through 90deg first and then if that works hopefully you guys can help me work out how to deal with that compound angle. It's very tricky geometrically, but I understand why it was done.... because of the wing box spar.

    Let you know how it goes.


  • hi Matt

    Could have given you a bum steer on axis, I assumed the f4u folded into the wing same as a spit but it looks like it folds backwards, so your axis may be correct after all.

    I would still stick to 90 degree axis to check it all out.

    In the code I gave above you will see there are 3 sets of axis which helps a lot to visualize.

    Stick with it as the undercarriage is definitely the hardest bit

    Here is Jan's matrix generator…atrix-generator


    Edited once, last by larrylynx: added matrix generator (August 2, 2019 at 10:18 AM).

  • Another day spent stabbing in the dark and getting nowhere. I don't think I can take much more of this. I know you don't want me to give up and I don't really want to myself but there will come a point where I have to for the sake of my sanity.... my mind is getting like this:)


  • I've re-jigged the model so that using this pivot point on the door (which is now attached to the upper gear)….

    These angles...

    The Gear should tuck neatly away.

    I cant work out how to translate this into what to put into the Matrix Generator... is this right?

    Ive attached the latest version of the TMD, TGI exporterTM Log and Aircraft converter log. Maybe you can make some sense of why its not working?


  • I'd just stick with basic matrices:

    Pretty all of your gear parts should have a matrix like this: 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0

    The B0 doesn't actually do anything in terms of the rotations, it just rotates the major axes of inertia. So not really important at all at this point.

    The gear retraction logic just depends on the R0 and X0 of the gear joint multi, R0 is the pivot, X0 is the rotation axis.

    The Pivot should be sth. like 0.5 0.8 -0.3 and the axis is probably 1.0 0.0 0.0 or so.

    With just a joint multi and the two rigidbodies Fuselage and LeftGear you should already see a gear leg that hinges on the correct retraction pivot. You can get rid of any other gear parts for this, just a basic rigidbody LeftGear attach to the fuselage and a rigidbodygraphics for the gear as well.

    Regarding X0:

    Set a rotation around Z by 30deg and a y rotation by 5 degrees. No additional 90° rotation since the gear is defined in the down state.

  • This is the code of the joint. R0 I've put in as the xyz co ordinates of the point on the Gear door shown above

                    <[tmvector3d][X0][ 1.0 0.0 0.0 ]>
                    <[tmvector3d][R0][0.029 0.844 -0.853 ]>

    As you say...

    Regarding X0:

    Set a rotation around Z by 30deg and a y rotation by 5 degrees. No additional 90° rotation since the gear is defined in the down state.

                    <[tmvector3d][X0][ 1.0 0.087266 0.523599 ]>

    Is that correct? (radians)


  • <[tmvector3d][X0][ 1.0 0.087266 0.523599 ]>

    Is that correct? (radians)


    The length of the axis has to stay at 1.0 so if one component is already at 1.0 the others can only be 0.0.....

    Something like this:

    0.862730 0.498097 -0.087156

    should work,

    you may have to flip the signs for y and z

  • I spent some more time on this yesterday but it still doesn't work... I really can't see what the problem is. I took the rigid body graphics out for the lower leg and wheel, but had to leave their dynamic sections in or the TMD crashed and the Cessna was loaded. The axis on the joint with fuselage.... can I clarify should be the hinging axis, I.e running roughly front to back... or should it be along the UC leg axis which is sideways in plan view but twisted backward 30deg? In either case to calculate the x0 value I need to get a vector from my spreadsheet using two points along it? R0 can be the pivot given in my spreadsheet or that point on the corner of the door that I've been using? One final query... should the hydraulic cylinder be bent back at 30deg so that it's acting directly inline with the retraction?

    This might give me some things I can try. I'm going to focus on getting this done this week... or at least making some significant progress. If I'm unable well I think it will be quitting time. Whatever happens I do appreciate the help you guys have given me.


  • Morning Matt from a sunny Madeira 8)

    In the graphics section the U/C leg is a rigidbodygraphics as its rotation is specified in the dynamics section. Anything along for the ride, like a scissor link has a [Graphics] line added with its parent named, ie UpperLeg or LowerLeg. If I remember rightly a hingedbody can't have a graphic line. The tm.log will soon tell you if its and I am wrong.:)

    I would forget about using offset hinges for the moment just get it all to work, that way your not worrying about what angle to put into the hydraulic damper etc as its all along a single axis. Graphics will not go to the correct location you want eventually but they will at least all stay together just fold into the wings at 90 degrees rather that 30 and 5.5. Figures in the x0 should be 1 or less as Jan advised and no they are not radians, I believe its a multi universe matrix or something ;)

    Try to use the correct location for the leg. Using the door location is great if they are co-located but will give problems if not, especially with offset hinges like yours as things will rotate about the wrong location. For a door it doesnt matter as it rotates along the line of the hinge but the leg doesnt in your case and if its a long way from the door hinge location it will effectively rotate around an arc

    All this is from memory and I cant check things, being on holiday, yes its hell, so I may be wrong but I'm sure Master Jan will correct me


    Edited once, last by larrylynx (August 4, 2019 at 12:17 PM).

  • I know nothing about this but are you working off the real life leg hinge mechanism? The front pivot is considerably higher than the rear. Sorry if that is OBVIOUS.

    The flap operation is almost instantaneous. Sorry .. ..

    Is your problem having a single axis swing of the leg produce fore and aft alignment gear down And flush with the undersurface alignment gear up? The raised front pivot takes care of that. Sorry .. ..

    Edited once, last by Overloaded (August 4, 2019 at 8:29 PM).

  • Sitting looking at lines of code for an hour this morning I've come to the conclusion that I don't understand this enough for it to be worth me wasting even another week on this so I've reluctantly had to admit defeat and give up. Perhaps Alex will succeed in getting his Mk9 Spitfire done so we can enjoy flying that in AF2 but I'm afraid my models wont be making it into AF2 skies. Sorry.


  • Honestly, has anyone been able to get complex undercarriages to work besides Ipacs itself? I'm aware of a developers who have tried and gave up, but none who succeeded.

    Devons rig

    Intel Core i5-13600K - Core i5 13th Gen 14-Core (6P+8E) @ 5.5Ghz / G.SKILL Trident Z5 RGB Series 32GB RAM DDR5 6000 / GIGABYTE GeForce RTX 4070Ti GAMING OC 12G / Sound Blaster Z / Oculus Quest 2 VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 6x Samsung SSD/NVME's various sizes / Windows 11 Pro 64-bit / GIGABYTE Z790 AORUS ELITE AX LGA 1700 ATX Motherboard DDR5

  • S-211 and F104G have working landing gear.

    Both actually done by me though, but all of the Just Flight aircraft have working landing gears where I didn't contribute anything.

    The gear may feel more difficult because it has a steep learning curve to it. It either works or doesn't work at all but you can get it to work with incremental steps.

    0) get rid of all "gear stuff".

    1) add wheels that are attached to the fuselage and change the tmc contact points to the wheel positions x,y,z + wheel radius as fourth entry, then the aircraft will settle on the ground easier. -> aircraft can collide with the ground and you can takeoff and fly.

    2) Add one rigidbody for the LeftGear

    3) attach a rigidbodygraphics to that with all left gear geometries attached to the LeftGear -> in sim: gear should be falling through the floor

    4) add a joint multi between the LeftGear and Fuselage -> in sim: should already stay connected with the fuselage and already hinge correctly, but still rotating freely around, clipping through fuselage and landing gear bay

    5) set the joint K and D values so that the gear stops rotating for now

    6) change the left wheel Body to the LeftGear

    7) increase values for K and D

    8 ) copy to right side -> fixed landing gear done... no damping but it works for now

    If you get this far then you can think about adding the damper element as well as the gear retraction.

    9) Add a second rigidbody for the lower gear: LeftGearLower

    10) change the wheel Body to LeftGearLower

    11) add joint multi to connect upper and lower gear legs -> should be a translational type, (Type 1 vs Type 0)

    12) add a damper from a similar aircraft (size matters :) ), change the R0 and R1 to be inside your gear leg

    -> with that the gear should have damping

    13) Copy paste the GearInput, GearSequence,... stuff from another aircraft with retractable gear

    14) Add a hydraulic cylinder that can pull the gear in, adjust R0 to be in the gear bay or above the wing, adjust R1 to be on the upper gear leg

    15) remove the K and D values from your joint to the fuselage

    -> gear should be capable of carrying the weight on the ground, when retracted the gear either snaps up (too much stroke) or gear doesn't fully retract (stroke too short)

    16) adjust the stroke of the cylinder until the retraction looks proper

    17) copy to right side

    18) do the graphics_wheel stuff so that the wheel is spinning visually

    19) add other stuff like torsionlinkages or linkagegraphics for non-essential gear parts.

  • S-211 and F104G have working landing gear.

    Yah, I was pretty sure Jet-Pac did those, and when I saw him beta testing for Just Flight I made the assumption (my fault) that he was going to have to do it for them as well. Problem is, the situation is kind of tenuous. Should Jan ever become unavailable for whatever reason (school, etc) , it seems right now, any hopes of third party aircraft development would come to a screeching halt, or at the very least be seriously crippled.

    It should not be this hard, it and if it has to be, there should be robust tools to mitigate the difficulty!

    Devons rig

    Intel Core i5-13600K - Core i5 13th Gen 14-Core (6P+8E) @ 5.5Ghz / G.SKILL Trident Z5 RGB Series 32GB RAM DDR5 6000 / GIGABYTE GeForce RTX 4070Ti GAMING OC 12G / Sound Blaster Z / Oculus Quest 2 VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 6x Samsung SSD/NVME's various sizes / Windows 11 Pro 64-bit / GIGABYTE Z790 AORUS ELITE AX LGA 1700 ATX Motherboard DDR5