*SSM Limiting Altitude in SA342s
-
- Posts: 22
- Joined: Mon Mar 26, 2018 12:51 pm
Re: *SSM Limiting Altitude in SA342s
Thanks much...I'm going to keep plugging away at this.
Any thoughts on modifying worldsize?
~tona
Any thoughts on modifying worldsize?
~tona
-
- Posts: 22
- Joined: Mon Mar 26, 2018 12:51 pm
Re: *SSM Limiting Altitude in SA342s
would that be: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
game.setphysics.airDensityZeroAtHeight (with height) (not sure how that is formatted)
Re: *SSM Limiting Altitude in SA342s
Like this, in the gamemodes (ex Conquest) ObjectSpawnTemplates.con file
Re: *SSM Limiting Altitude in SA342s
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 wrote:Any thoughts on modifying worldsize?
~tona
-
- Posts: 22
- Joined: Mon Mar 26, 2018 12:51 pm
Re: *SSM Limiting Altitude in SA342s
I might just let that thought simmer then...I'm just thinking out loud trying to resolve this pesky problem.freddy wrote: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 wrote:Any thoughts on modifying worldsize?
~tona
Thanks for the reply thought, I really appreciate the help.
~tona
-
- Posts: 22
- Joined: Mon Mar 26, 2018 12:51 pm
Re: *SSM Limiting Altitude in SA342s
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
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
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
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
-
- Posts: 22
- Joined: Mon Mar 26, 2018 12:51 pm
Re: *SSM Limiting Altitude in SA342s
I will give this a try. Thanks so much for your help.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
~tona
Re: *SSM Limiting Altitude in SA342s
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.
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
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.
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™