*SSM Limiting Altitude in SA342s

Ask questions, discuss ideas, get answers
tonawandares
Posts: 22
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Post by tonawandares »

Thanks much...I'm going to keep plugging away at this.

Any thoughts on modifying worldsize?

~tona
tonawandares
Posts: 22
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Post 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)
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Post by freddy »

Like this, in the gamemodes (ex Conquest) ObjectSpawnTemplates.con file
Attachments
flight.jpg
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Post 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.
tonawandares
Posts: 22
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Post 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
tonawandares
Posts: 22
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Post 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
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *SSM Limiting Altitude in SA342s

Post 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
tonawandares
Posts: 22
Joined: Mon Mar 26, 2018 12:51 pm

Re: *SSM Limiting Altitude in SA342s

Post 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
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: *SSM Limiting Altitude in SA342s

Post 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.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: *SSM Limiting Altitude in SA342s

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply