IPB

Welcome Guest ( Log In | Register )

Plane turn rate
mft004
post Jan 22 2018, 02:10 PM
Post #1


Private
**

Group: Soldiers
Posts: 20
Joined: 21-November 17
From: England
Member No.: 12,426



Hello there,

I'm working on a modification of the FH2 mod, in which I'm making planes, be they biplanes or monoplanes, much much slower. With help from these forums and others I've got the plane speed nice and low and reduced the power of gravity so the ride's much smoother and sleepier. But I was wondering... is there a way to keep that slow sleepy ride (the key was reduced torque) whilst ALSO having a fast, very responsive turn rate? I know that sounds wierd but hey, I'm curious.

Thanks for any comments,
Mark
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 7)
clivewil
post Jan 22 2018, 09:20 PM
Post #2


meh.
Group Icon

Group: Mr. Admin
Posts: 2,008,283
Joined: 24-July 07
From: Perth, Western Australia
Member No.: 3,545



well i have no idea what you already know and what you don't, so i'll just give you a basic layout of how that stuff works so you can do a few experiments

when i say 'Wing' (capitalised) i am referring to the code items that the BF2 engine uses to give our planes control surfaces. you can use the actual 3D geometry for this purpose, i.e. you could export your plane with e.g. Fokker_EIII_Elevator__Wing which means the plane's elevator mesh has extra code to make it behave as a Wing and exert control forces to make the plane pitch up and down

you might argue that this is the 'proper' way of doing it but it has several disadvantages, mainly that every extra plane you build will have to be set up completely afresh and some configurations will never fly properly because their layout might not be friendly to the BF2 engine (if you know what an X-29 is, i suspect that jet might be an extreme case of this)

also, because your primary requirement would be flight physics and cosmetic appearance would be secondary, some of your control surfaces might look a bit odd in the game, either deflecting too much or not enough, e.g. your elevator might need 60 degrees of pitch or your ailerons might only need 5 degrees - every plane you export would be different

i used another system for mine - i 'stole' the flight surfaces from the BF2 J-10 (which everyone agreed had the best handling) and converted those surfaces to pure code objects. they are therefore invisible and can be manipulated however you need without altering the appearance of the plane; the mesh control surfaces on the plane are just plain old RotationalBundles and can be set up so they look correct without harming the plane's flight behaviour

a Wing has a few properties you'll want to fiddle with, here is an example from my Pterodactyl ultralight:

ObjectTemplate.create Wing Pterodactyl_RWinglet
ObjectTemplate.modifiedByUser "clivewil"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate S_Pterodactyl_RWinglet_RotationRpm
rem -------------------------------------
ObjectTemplate.setMinRotation 0/-5/0
ObjectTemplate.setMaxRotation 0/5/0
ObjectTemplate.setMaxSpeed 0/300/0

ObjectTemplate.setAcceleration 0/75/0
ObjectTemplate.setInputToPitch PIPitch
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.rememberExcessInput 1
ObjectTemplate.setPitchOffset 1.8
ObjectTemplate.setPositionOffset 1/-0.2565/0

ObjectTemplate.setWingLift -0.5
ObjectTemplate.setFlapLift 1.2


mostly you'll want to concern yourself with:

Acceleration - how fast the control surface reacts to your input. quick acceleration means a 'twitchy' plane.
WingLift - how much lift the wing generates regardless of control input - e.g. for elevators, use this to trim the plane to fly level
FlapLift - how much force is generated when you input some stick control, higher number means more force

so for your elevator, if you had a moderate Acceleration but a high FlapLift, your plane would be mildly responsive but could pitch very tightly (probably close to what you want)

if you had a high Acceleration but low FlapLift, it would jiggle and buck but would have a very large turning circle/loop radius

if you have a mind to, perhaps you might try my ulralight Scout - it has the sort of handling you'd expect from a plane powered by a lawnmower engine

http://www.battlefieldsingleplayer.com/for...showtopic=16032

...feel free to grab and adapt any parts of these that might be handy to you

one item in it needs explanation - the 'WingSpinner' - BF2 aircraft contain a Wing usually called (incorrectly) a VerticalBodyWing or similar - what this does is add drag to the back of the plane to make it 'weathervane' i.e. if you jump out of it, the plane will crash nose-first.

on my ultralights, i included a RotationalBundle that spins the wing 90 degrees upwards on Enter so that it now provides lift to help you remain airborne; as soon as you exit or are destroyed it quickly pivots back again so the plane dives nose-first as expected (while you're flying normally the Engines and Wings provide lateral stability - it doesn't flat spin like you might think)

ALSO NOTE that for any map that uses underpowered planes, you should add the line:
physics.airDensityZeroAtHeight 2500
...to the end of the map's Init.con - this gets rid of the 'higher you go, faster you go' glitch that makes planes uncontrollable over a certain altitude

hell, just add it to every map you have and be done with it. it's worth it.

---> using the above system, i made a few old biplanes etc. of my own, but i never got around to releasing them (i don't think so, anyway)

DH-2


Nieuport


Fokker D-VIII


...plus a whole stack of other stuff not shown here


--------------------
Go to the top of the page
 
+Quote Post
Death_EnForcer
post Jan 23 2018, 06:53 AM
Post #3


Dictator
Group Icon

Group: BFSP Team
Posts: 2,608
Joined: 17-July 04
From: New Jersey, USA
Member No.: 294



Great info as usual, clive. Nice job. bigthumb.gif
Go to the top of the page
 
+Quote Post
mft004
post Jan 24 2018, 12:51 PM
Post #4


Private
**

Group: Soldiers
Posts: 20
Joined: 21-November 17
From: England
Member No.: 12,426



Those Chinese outposts on the FH-2's 03:00 don't stand a chance!

Some fine models there Clive and many thanks for all the options, I'll admit I'm not getting round to the plane work for my mini-mod just yet, gotta make all the tanks 10 times tankier first. But when the plane stage comes I'll be working from your comments above to get the best jumpy sloths possible smile.gif
Go to the top of the page
 
+Quote Post
Notwithstanding
post Jan 24 2018, 03:14 PM
Post #5


Private
**

Group: Soldiers
Posts: 27
Joined: 16-March 16
From: Europe
Member No.: 11,303



Excellent info Clive! Much appreciated! happy.gif
Go to the top of the page
 
+Quote Post
General_bradly
post Jan 25 2018, 10:21 AM
Post #6


Enlisted
*

Group: Soldiers
Posts: 4
Joined: 14-January 15
Member No.: 10,477



QUOTE (Notwithstanding @ Jan 24 2018, 03:14 PM) *
Excellent info Clive! Much appreciated! happy.gif





I 100% agree/vouche for clive's method of adding 'wings' to aircraft. We have added a ton of new aircraft to our IDF mod recently ranging widely in size and clivewil's method worked really well for all of the aircraft we added.

Thanks clive!

Go to the top of the page
 
+Quote Post
Stubbfan
post Feb 2 2018, 05:01 PM
Post #7


Enlisted
*

Group: Soldiers
Posts: 7
Joined: 11-May 14
Member No.: 10,157



The planes in FH2 are coded like already as well, so you would only need to modify the values as suggested by Clivewil. All the actual physics related code are placed under objects/air/common/

As for speed of the planes you can work with torque, but also with the differential (basically think torque * differential = speed). When lowering torque, you'd probably need to lower gravitymodifier settings and or play with the winglift (increase) settings to be able to get the plane airborne and not just stall all the time.

You could also potentially lower the drag value to get the plane to feel more nimble, and perhaps also the inertiamodifier settings for xyz.

Also, nice looking planes Clivewil!
Go to the top of the page
 
+Quote Post
mft004
post Feb 3 2018, 06:41 AM
Post #8


Private
**

Group: Soldiers
Posts: 20
Joined: 21-November 17
From: England
Member No.: 12,426



Top stuff Stubbfan, I'll bear those in mind also.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th February 2018 - 11:22 AM