Page 2 of 3

Re: *SSM Limiting Altitude in SA342s

PostPosted: Wed Apr 11, 2018 3:10 am
by tonawandares
Thanks much...I'm going to keep plugging away at this.

Any thoughts on modifying worldsize?

~tona

Re: *SSM Limiting Altitude in SA342s

PostPosted: Wed Apr 11, 2018 4:09 am
by tonawandares
freddy wrote:You can add physics.airDensityZeroAtHeight per map basis, or possibly for all maps if you add it in the game.rfa init.con file


would that be:

game.setphysics.airDensityZeroAtHeight (with height) (not sure how that is formatted)

Re: *SSM Limiting Altitude in SA342s

PostPosted: Thu Apr 12, 2018 7:59 am
by freddy
Like this, in the gamemodes (ex Conquest) ObjectSpawnTemplates.con file

Re: *SSM Limiting Altitude in SA342s

PostPosted: Thu Apr 12, 2018 8:08 am
by freddy
tonawandares wrote:Any thoughts on modifying worldsize?

~tona

Im pretty sure that can be tricky if you want it to be a serverside mod, but otherwise there is for example some scale settings for the map where one can change the figures, ivé done it a long time ago so cant remember exactly, but i do remember it got a bit ugly when the textures was stretched out.

Re: *SSM Limiting Altitude in SA342s

PostPosted: Thu Apr 12, 2018 5:33 pm
by tonawandares
freddy wrote:
tonawandares wrote:Any thoughts on modifying worldsize?

~tona

Im pretty sure that can be tricky if you want it to be a serverside mod, but otherwise there is for example some scale settings for the map where one can change the figures, ivé done it a long time ago so cant remember exactly, but i do remember it got a bit ugly when the textures was stretched out.


I might just let that thought simmer then...I'm just thinking out loud trying to resolve this pesky problem.
Thanks for the reply thought, I really appreciate the help.

~tona

Re: *SSM Limiting Altitude in SA342s

PostPosted: Thu Apr 12, 2018 11:35 pm
by tonawandares
Just not having much luck at this.
I set the zero air density height at 150 meters. Sadly, I just continued to climb with no adverse effect

sigh

Re: *SSM Limiting Altitude in SA342s

PostPosted: Sun Apr 15, 2018 9:44 am
by freddy
Thats weird, i guess the choppers need to be set as "ObjectTemplate.setVehicleCategory VCAir" and the engines "ObjectTemplate.setEngineType c_ETPlane"

Thats all i can think of that could be wrong

edit: you can try the code directly in the console like this
-
https://youtu.be/Wr2jwZO5REw

Re: *SSM Limiting Altitude in SA342s

PostPosted: Mon Apr 16, 2018 4:08 am
by tonawandares
freddy wrote:Thats weird, i guess the choppers need to be set as "ObjectTemplate.setVehicleCategory VCAir" and the engines "ObjectTemplate.setEngineType c_ETPlane"

Thats all i can think of that could be wrong

edit: you can try the code directly in the console like this
-
https://youtu.be/Wr2jwZO5REw


I will give this a try. Thanks so much for your help.

~tona

Re: *SSM Limiting Altitude in SA342s

PostPosted: Mon Apr 16, 2018 11:49 am
by russ
It's pretty clear how airDensityZeroAtHeight effects wings, but the effect on engine thrust is really unclear. In fact, it looks like as you get to the height, your thrust might actually be increasing. It'd be interesting to do a helicopter takeoff test, once with airDensityZeroAtHeight at 1000.0, and another with it at 0.0.

The basic math is make an acceleration vector with the object's rotation vector * gear ratio * rpm. However, the rpm value gets modified in a strange way:

rpm = rpm / 10.0 + (rpm - modifier term) * fabs(rpm - modifier term)

where modifier term is:

(air density ratio * (rotation vector · speed vector)) / noPropellerEffectAtSpeed

and air density ratio is 1.0 at altitude 0, and 0.0 at altitude airDensityZeroAtHeight.

When the modifier term is zero, you basically get rpm². And as you approach airDensityZeroAtHeight, this term will approach zero. Strangely, you can modify this term using noPropellerEffectAtSpeed. It looks like the intent of the term is to decrease the amount of thrust produced when your rotation vector and speed vector are aligned. It means you eventually reach some max speed. I think this term is why at high altitudes, planes start accelerating. The flight controls stop working at high altitude as well since lift stops working. This of course can lead to planes very quickly flying uncontrollably off the map.

Re: *SSM Limiting Altitude in SA342s

PostPosted: Mon Apr 16, 2018 10:30 pm
by Swaffy
Test ran on Swaffy's Mod on map A Test Map.
Code saved in ObjectSpawnTemplates.con under Conquest.

Code tested:
game.setphysics.airDensityZeroAtHeight 10

Code tested:
game.setphysics.airDensityZeroAtHeight 0.0

Code tested:
game.setphysics.airDensityZeroAtHeight -1000

Result:
Planes flew like normal with no change in performance in all 3 tests.