[Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Completed]
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Excellent, thanks for the feedback!
I'm doing this entirely in the code by the way (not using the editor), so it may be difficult on my end to handle issues with the flap models without an obscene amount of trial and error, so I'll hammer the other stuff first.
In order of highest to lowest priority:
1. Continue to explore the rudder; this guy causes the plane to roll the opposite way in regular flight too, which is a problem. Rhino, could it have something to do with the location of the effective wing? (I.E. if I raised or lowered it, would the rudder influence roll more/less?
2. Continue to explore issues with the nose dropping during forward flight. I'll start by scooting the wing forward.
3. Bump up the harrier's speed to put it on scale with the other ground attack birds (aim for about 1440 vel at nap altitudes, so about a 20% increase?). I'll also nudge up the engine acceleration time slightly.
4. Continue to tune the Harrier's hover rotational handling. Would it be okay to make the harrier pitch much more gradually than it currently does?
5. Investigate taxiing. I'll start by seeing if I can get the current system to work, which might be easier once I tweak the pitch engine.
If not, I have a third alternative, inspired by the penchant of the A-10's cannon to shove the plane backwards as it fires: Make a weapon (two weapons probably) that would push the plane forwards and backwards respectively. I don't have any experience making entirely new "weapons" or weapon huds, so that might be a small assignment for one of the veteran folks who works with the HUD's. Sounds like it would be simple to implement otherwise.
6. Investigate the physical depiction of the flaps. If both the aileron flaps and landing flaps are keyed to the same unit, I will at least set it up so that the physical flaps will deploy in landing position (as opposed to their current roll behavior), and submit that; once the export is corrected, one in theory should be able to simply copy-pasta the handling logic onto the landing flaps.
Off I go!
I'm doing this entirely in the code by the way (not using the editor), so it may be difficult on my end to handle issues with the flap models without an obscene amount of trial and error, so I'll hammer the other stuff first.
In order of highest to lowest priority:
1. Continue to explore the rudder; this guy causes the plane to roll the opposite way in regular flight too, which is a problem. Rhino, could it have something to do with the location of the effective wing? (I.E. if I raised or lowered it, would the rudder influence roll more/less?
2. Continue to explore issues with the nose dropping during forward flight. I'll start by scooting the wing forward.
3. Bump up the harrier's speed to put it on scale with the other ground attack birds (aim for about 1440 vel at nap altitudes, so about a 20% increase?). I'll also nudge up the engine acceleration time slightly.
4. Continue to tune the Harrier's hover rotational handling. Would it be okay to make the harrier pitch much more gradually than it currently does?
5. Investigate taxiing. I'll start by seeing if I can get the current system to work, which might be easier once I tweak the pitch engine.
If not, I have a third alternative, inspired by the penchant of the A-10's cannon to shove the plane backwards as it fires: Make a weapon (two weapons probably) that would push the plane forwards and backwards respectively. I don't have any experience making entirely new "weapons" or weapon huds, so that might be a small assignment for one of the veteran folks who works with the HUD's. Sounds like it would be simple to implement otherwise.
6. Investigate the physical depiction of the flaps. If both the aileron flaps and landing flaps are keyed to the same unit, I will at least set it up so that the physical flaps will deploy in landing position (as opposed to their current roll behavior), and submit that; once the export is corrected, one in theory should be able to simply copy-pasta the handling logic onto the landing flaps.
Off I go!
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Pretty much all of us do 90% of our coding by hand though the .con and .tweak files to save on the editor screwing stuff up, but this dosen't mean you can't use the editor. If you go into your editor settings and go into reload settings, you can make your editor reload modified .con and .tweak files (as well as modified textures etc) which means you can edit on the fly and see your changes instantly in the editorJafar Ironclad wrote:I'm doing this entirely in the code by the way (not using the editor), so it may be difficult on my end to handle issues with the flap models without an obscene amount of trial and error, so I'll hammer the other stuff first.
Not sure, I've not really done much jet handling coding, only the basics in the past. Take a look at the other jets and see how they do there rudders but ye, like you said it may be due to the wing being high up, you could try lowering it to be in the centre.Jafar Ironclad wrote:1. Continue to explore the rudder; this guy causes the plane to roll the opposite way in regular flight too, which is a problem. Rhino, could it have something to do with the location of the effective wing? (I.E. if I raised or lowered it, would the rudder influence roll more/less?
Yep sounds goodJafar Ironclad wrote:3. Bump up the harrier's speed to put it on scale with the other ground attack birds (aim for about 1440 vel at nap altitudes, so about a 20% increase?). I'll also nudge up the engine acceleration time slightly.
Ye possibly, might make it less forgiving but then again, will probably mean you can put it where you want it more easilyJafar Ironclad wrote:4. Continue to tune the Harrier's hover rotational handling. Would it be okay to make the harrier pitch much more gradually than it currently does?
Also possibly look into making it move more when tilting it in one direction, as you really need to put the nose right down in order for it to go forwards by any amount, but then again, this might make it harder to get it in a stable hover.
Have a play and see what you come up with, keep the current code backed up of course
Ye, a force weapon could would (you could have pri weapon as forward and secondary weapon as back) but there might be an issue with adding more weapons as iirc, with all the view weapons we have already ran into the limit of weapons we can put on the jetsJafar Ironclad wrote:5. Investigate taxiing. I'll start by seeing if I can get the current system to work, which might be easier once I tweak the pitch engine.
If not, I have a third alternative, inspired by the penchant of the A-10's cannon to shove the plane backwards as it fires: Make a weapon (two weapons probably) that would push the plane forwards and backwards respectively. I don't have any experience making entirely new "weapons" or weapon huds, so that might be a small assignment for one of the veteran folks who works with the HUD's. Sounds like it would be simple to implement otherwise.
Sounds goodJafar Ironclad wrote:6. Investigate the physical depiction of the flaps. If both the aileron flaps and landing flaps are keyed to the same unit, I will at least set it up so that the physical flaps will deploy in landing position (as opposed to their current roll behavior), and submit that; once the export is corrected, one in theory should be able to simply copy-pasta the handling logic onto the landing flaps.
Off I go!
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Got taxiing to work under the current system. As long as the throttle is near zero (neither forward nor reverse) you can taxi like normal.
Slower hover handling also now implemented.
Increased speed now implemented, the harrier tops around 1380 now in forward flight. This also fixed the nose-drop trend: it actually rises a bit now. Is that a problem?
Increasing the speed also made short-take-offs even more reliable.
Still working on the rudder issue. Once I make some headway/squander 2 hours on this I'll release the next version of the harrier code.
Slower hover handling also now implemented.
Increased speed now implemented, the harrier tops around 1380 now in forward flight. This also fixed the nose-drop trend: it actually rises a bit now. Is that a problem?
Increasing the speed also made short-take-offs even more reliable.
Still working on the rudder issue. Once I make some headway/squander 2 hours on this I'll release the next version of the harrier code.
-
PLODDITHANLEY
- Posts: 3608
- Joined: 2009-05-02 19:44
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
They do have an air brake mounted underneath behind the rear wheels.
In the Falklands war they put chaff in it as a anti radar bodge. When the wheels are down they open automatically.
In the Falklands war they put chaff in it as a anti radar bodge. When the wheels are down they open automatically.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Cool, wasn't sure if it was an air brake or a opening for a exhaust used for hover as it is a pretty small flap 

A little tricky to get the throttle at 0% thou with a joystick throttle but possible.


Sounds good as long as it dosen't flip on its nose etcJafar Ironclad wrote:Got taxiing to work under the current system. As long as the throttle is near zero (neither forward nor reverse) you can taxi like normal.
A little tricky to get the throttle at 0% thou with a joystick throttle but possible.
Top speed sounds good, although perhaps a little faster? And ye the nose raising is a little bit of a problem, you really want a strait and level flight as if the aircraft has been properly trimmed, wouldn't be much of a problem if you could trim the aircraft inflight but you can'tJafar Ironclad wrote:Increased speed now implemented, the harrier tops around 1380 now in forward flight. This also fixed the nose-drop trend: it actually rises a bit now. Is that a problem?
Possibly lower the amount of lift the wings give if its a bit short? I thought it was pretty much perfect before?Jafar Ironclad wrote:Increasing the speed also made short-take-offs even more reliable.
Sounds goodJafar Ironclad wrote:Still working on the rudder issue. Once I make some headway/squander 2 hours on this I'll release the next version of the harrier code.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Done working on this guy for the night. Here are the issues I've leaving to solve later, and could really use some help with:
1. Rudder still causes significant counter-rolling, both in normal and hover flight (I.E. ruddering left causes you to roll clockwise). Can be compensated for by pilot input, but this problem has been the bane of my work on this project.
2. The good news is that the exporters did their job: there are separate flaps and ailerons. I've taken the flaps out of the "rolling" picture and made them into rotational bundles. The bad news is that I can't seem to get the flaps to engage on 0 through -100 throttle. Minor detail, doesn't effect actual flight. Flaps are currently inert.
3. I'd really like to get the hovering jet to behave somewhat like a helicopter when you put it into a dive angle: have it freaking DIVE! I compared a bit to the apache's engine, but didn't have time to spot the specific things I needed to put in to emulate the diving behavior, and found that the little things I did put in broke the plane's handling in half.
Some info:
1. Top speed pans around 1450 when flying at low altitudes. At this speed, you will fly level without any inputs, no climb or dive; there is a miniscule clockwise roll however.
2. Carrier takeoff as it was in prior released code (I.E. just about perfect)
3. Slower response with rotational inputs while in hover mode. I also took the "stabilizer" engines out of the picture, and the plane works fine without them.
4. Plane now taxi's.
Question: How quickly should the plane be able to climb in a straight hover? I feel like it kinda hauls *** vertically right now, but I'm not sure whether to change it.
1. Rudder still causes significant counter-rolling, both in normal and hover flight (I.E. ruddering left causes you to roll clockwise). Can be compensated for by pilot input, but this problem has been the bane of my work on this project.
2. The good news is that the exporters did their job: there are separate flaps and ailerons. I've taken the flaps out of the "rolling" picture and made them into rotational bundles. The bad news is that I can't seem to get the flaps to engage on 0 through -100 throttle. Minor detail, doesn't effect actual flight. Flaps are currently inert.
3. I'd really like to get the hovering jet to behave somewhat like a helicopter when you put it into a dive angle: have it freaking DIVE! I compared a bit to the apache's engine, but didn't have time to spot the specific things I needed to put in to emulate the diving behavior, and found that the little things I did put in broke the plane's handling in half.
Some info:
1. Top speed pans around 1450 when flying at low altitudes. At this speed, you will fly level without any inputs, no climb or dive; there is a miniscule clockwise roll however.
2. Carrier takeoff as it was in prior released code (I.E. just about perfect)
3. Slower response with rotational inputs while in hover mode. I also took the "stabilizer" engines out of the picture, and the plane works fine without them.
4. Plane now taxi's.
Question: How quickly should the plane be able to climb in a straight hover? I feel like it kinda hauls *** vertically right now, but I'm not sure whether to change it.
Last edited by Jafar Ironclad on 2013-06-27 09:44, edited 1 time in total.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Its getting there 
1. Ye didn't notice the rudder before for some very odd reason but its really quite bad aint it hehe. Really needs fixing
2. Ye rgr, if you look at the "us_jet_harrier_Jetnozzle_front" which is also rotated when going into reverse flight you will find the code needed to make it work with the throttle
3. I wouldn't have it behave too much like a chopper but ye, needs to act a little bit more like one, currently when you shift the nose forward hardly anything happens where you should really start to be flying forwards (and diving a bit).
4. Top speed is now good, I actually didn't notice it at first as it felt just right for the aircraft and ye, flying very nice and level now
5. Take-off is also good still
6. Can't really say I noticed much of a difference in the hovering handling but felt pretty good, other than when tipping the nose over to the right the nose still dropped forward and rotated left...
7. Ye taxiing seems to be working fine now, other than again on the ground the nose wants to fall on its face and on to one side without doing much like one of thous crappy 3 wheeler cars

I have a feeling that problem, and possibly the hovering problem may be down to the Centre of Gravity (CG) of the aircraft, ie, where its pivot is which at the moment, looks to be possibly a little bit too near the nose to me...

Moving it back (and possibly down a little too) might solve a few problems but then again it will most likley mean tweaking all your code again to work with the new CG
Also another thing you can look into is having the Rudder rotate more (visually) as at the moment it hardly moves, possibly look at the ailerons too.
Notes for exporters:
1. Ye didn't notice the rudder before for some very odd reason but its really quite bad aint it hehe. Really needs fixing
2. Ye rgr, if you look at the "us_jet_harrier_Jetnozzle_front" which is also rotated when going into reverse flight you will find the code needed to make it work with the throttle
Code: Select all
ObjectTemplate.setMinRotation 0/-90/0
ObjectTemplate.setMaxSpeed 0/50/0
ObjectTemplate.setAcceleration 0/400/0
ObjectTemplate.setInputToPitch [b]PIThrottle[/b]4. Top speed is now good, I actually didn't notice it at first as it felt just right for the aircraft and ye, flying very nice and level now
5. Take-off is also good still
6. Can't really say I noticed much of a difference in the hovering handling but felt pretty good, other than when tipping the nose over to the right the nose still dropped forward and rotated left...
7. Ye taxiing seems to be working fine now, other than again on the ground the nose wants to fall on its face and on to one side without doing much like one of thous crappy 3 wheeler cars

I have a feeling that problem, and possibly the hovering problem may be down to the Centre of Gravity (CG) of the aircraft, ie, where its pivot is which at the moment, looks to be possibly a little bit too near the nose to me...

Moving it back (and possibly down a little too) might solve a few problems but then again it will most likley mean tweaking all your code again to work with the new CG
Also another thing you can look into is having the Rudder rotate more (visually) as at the moment it hardly moves, possibly look at the ailerons too.
Notes for exporters:
- The side wheels are not rounds... http://img651.imageshack.us/img651/5638 ... 022146.jpg
- Final LOD too high (2,350 * 1,940), needs to be under 100tris.
- cockpits very shiney: http://img835.imageshack.us/img835/2007 ... 023419.jpg
Last edited by Rhino on 2011-08-02 01:49, edited 1 time in total.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
How do I move the Center of Gravity in the code?
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Not possible, must be done via export.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Gotcha. I had an idea for a workaround to the rudder: basically I'd make an additional set of "ailerons" that trigger on the Yaw input and would counter any rudder-induced roll. Would moving the Center of Gravity potentially influence/solve the rudder problem too, or should I go ahead and engineer the workaround?
Landing flap system now operational.
Landing flap system now operational.
Last edited by Jafar Ironclad on 2011-08-02 02:04, edited 1 time in total.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
The, the CG change dosen't look to be fixing it and I wouldn't go with that idea unless there is nothing else you can do tbh. Take another look at how the other jets do there rudders and try putting there code on the harrier. Got to be a reason for this happening so its best to diagnose the problem rather than work around it as you want to keep the code etc as simple as possible for performance reasons and adding extra ailerons isn't going to helpJafar Ironclad wrote:Gotcha. I had an idea for a workaround to the rudder: basically I'd make an additional set of "ailerons" that trigger on the Yaw input and would counter any rudder-induced roll. Would moving the Center of Gravity potentially influence/solve the rudder problem too, or should I go ahead and engineer the workaround?
NiceJafar Ironclad wrote:Landing flap system now operational.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Right I've PMed you a updated mesh and .con file with a fixed up Centre of Gravity + a few other mesh fixes too but tbh, the export scene is quite a mess and is going to need quite a bit of work.
The Pivot has changed quite a bit, -0.5/1.0/0.0 (most likley a different x,y,z order in BF2, probably -0.5/0.0/1.0 but not 100%) so a lot of stuff is out of place, like the cockpit camera is really deep inside the body and the bombs etc on the wings are all out of place but the flight code etc seems to be working ok. Just try playing around with this new CG and see if its any better but we might go back to the old one if its not but feels a little better to me in the editor.
The Pivot has changed quite a bit, -0.5/1.0/0.0 (most likley a different x,y,z order in BF2, probably -0.5/0.0/1.0 but not 100%) so a lot of stuff is out of place, like the cockpit camera is really deep inside the body and the bombs etc on the wings are all out of place but the flight code etc seems to be working ok. Just try playing around with this new CG and see if its any better but we might go back to the old one if its not but feels a little better to me in the editor.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Thanks, I'll make the necessary corrections and adjustments. I'm going to leave the flaps as rotational bundles for now.
No change to the rudder, but that was expected.
Also, I can't seem to get the control surfaces to divert more visually when they're a "wing". Any idea what I'm supposed to do here?
No change to the rudder, but that was expected.
Also, I can't seem to get the control surfaces to divert more visually when they're a "wing". Any idea what I'm supposed to do here?
Last edited by Jafar Ironclad on 2011-08-02 04:29, edited 1 time in total.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Taxi'ing still works, but something about the transition exacerbated the plane's pitching problems when taxi'ing.
Also, getting close to my wits end with the damn rudder problem. Going to look around the internets and see if other folks have had similar problems with their pet plane projects.
Also, getting close to my wits end with the damn rudder problem. Going to look around the internets and see if other folks have had similar problems with their pet plane projects.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
You mean you can't get the flaps to move more? Have you tried increasing the min and max rotation?Jafar Ironclad wrote: Also, I can't seem to get the control surfaces to divert more visually when they're a "wing". Any idea what I'm supposed to do here?
Code: Select all
ObjectTemplate.activeSafe Wing us_jet_harrier_raileron
ObjectTemplate.modifiedByUser "Phil"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
ObjectTemplate.addTemplate S_us_jet_harrier_raileron_RotationRpm
rem -------------------------------------
[b]ObjectTemplate.setMinRotation 0/-8/0
ObjectTemplate.setMaxRotation 0/8/0[/b]
ObjectTemplate.setMaxSpeed 0/50/0
ObjectTemplate.setAcceleration 0/250/0
ObjectTemplate.setInputToPitch PIRoll
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setPositionOffset 0/0/0
ObjectTemplate.setWingLift 1.0
ObjectTemplate.setFlapLift 1.0Code: Select all
ObjectTemplate.setMinRotation 0/-14/0
ObjectTemplate.setMaxRotation 0/14/0Ye I noticed this one too, in theory what I've done should help it but it hasn't...Jafar Ironclad wrote:Taxi'ing still works, but something about the transition exacerbated the plane's pitching problems when taxi'ing.
Will take a look at this one myself.Jafar Ironclad wrote:Also, getting close to my wits end with the damn rudder problem. Going to look around the internets and see if other folks have had similar problems with their pet plane projects.
EDIT: had a good look, can't find anything wrong with it and tried tweaking a bunch of stuff with no luck. Only thing that has resolved it has been removing the rudder, but then you do not get any turning so the problem is definitely with the rudder.
Last edited by Rhino on 2011-08-02 07:09, edited 2 times in total.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
I'm going to roll back to the most recent version I released on this thread. Too many things broke, not enough things got fixed. I'll re-release it with the landing flaps operational in a little bit.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Ye rgr, if you haven't noticed any improvements go back as things are much simpler when keeping to the old mesh.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
As an aside, I noticed that the rudder lift was disabled on the British version of the harrier when I first looked at it. Maybe this little frustration was why?
[File coming soon]
[File coming soon]
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Na I tried adding lift to the rudder and that didn't help, just made the rudder less responsive 
EDIT: I'm going to send Leusch a PM as he is a much better coder than I am.
EDIT: I'm going to send Leusch a PM as he is a much better coder than I am.
Last edited by Rhino on 2011-08-02 08:24, edited 1 time in total.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: [Code] Working Harrier and retuned jet handling (EF, Tornado, J10, SU-30)[Complet
Much appreciated. Here's the latest; landing flaps are in, the rudder animates as specified, the plane slides forward better in hover mode, slightly more power in the hovering rudder. Playing with the ailerons resulted in some dramatic changes to the flight characteristics, so I'm not going to screw with them for now.
Last edited by Jafar Ironclad on 2013-06-27 09:44, edited 1 time in total.

