Development update 21/07/2014: Late NightsEvening all!
I know there has been a lack of development lately, but this is because I'm in the process of moving to a whole different part of the country so I've been busy sorting that out.
The past few days, I've been attempting to tackle the landing gear animations. For those that don't know how it works, Outerra uses code like this for animations:
this.geom.rotate_joint_orig(landing_gear_nose_id, ((jsb['gear/gear-pos-norm']) * 4 / 1.7, {x:1,y:0,z:0});
And this was all fine and dandy, except one thing. The landing gear was starting inside the plane, and lowering when it should be raising.
My initial thoughts where that the input from 'gear/gear-pos-norm' must be the wrong way round so I looked for ways to change that from the JSBSim aircraft file but found nothing. After that I thought, cant I just mathematically reverse the animation? My brain just thought, make it negative? So I tried multiplying my -1 but of course that simply reversed the direction that the wheel lowered from. By this point it was getting near 3am, almost 2 hours since I'd found the issue. So I called it a night.
I woke the next day, sat in-front of the computer and within 10 minutes I had a solution, multiply by -1 and then add 1 to keep it positive.
So:
this.geom.rotate_joint_orig(landing_gear_nose_id, ((jsb['gear/gear-pos-norm']) * 4 / 1.7, {x:1,y:0,z:0});
Becomes:
this.geom.rotate_joint_orig(landing_gear_nose_id, ((jsb['gear/gear-pos-norm']) * -1 + 1) * 4 / 1.7, {x:1,y:0,z:0});
I know there's probably another few ways of fixing this issue, but that's how I solved it.
Anyway, enough of that, here's some pretty pictures:
As you can see, it's starting to look a lot better than that original screenshot!
Something I have been thinking over recently though, is that I am no texture artist. I can unwrap and slap something made in photoshop over the model but when it comes down to it, I don't have much of an idea when it comes to making it look real.
If anyone out there would be willing to help me, it would be hugely appreciated.
Thanks,
Ali