Physics.airDensityZeroAtHeight

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Physics.airDensityZeroAtHeight

Post by Apache Thunder »

Not sure if anyone found this one. Discovered this while playing with the debugger.

Basically it changes what height that planes and other aircraft will "stall" at. Setting it to zero renders all aircraft unflyable. Setting it to -1 will in theory disable stalling completely. This can probably be adjusted on a map per map bases. This is global and not object specific:

Default value for this command is:

Code: Select all

Physics.airDensityZeroAtHeight 1000
Perhaps this can be added to adjust the global stall height for all aircraft? I would imagine this is server side too.

There's also this command:

Code: Select all

Physics.wind 0/0/0
A vector 3. Default is no wind. If you set the wind to blow left for example:

Code: Select all

Physics.wind -2/0/0
Then aircraft will be nudged slightly to the left with the wind and particles/sprites will also move with the wind. ;)

I set it to -100/0/0 and all the vehicles were blown off the map. it was quite hilarious. :P
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

havent seen the wind one before but it sounds it couls be a cool addon to some maps. the airDensityZeroAtHeight i have used for a long time now (ssm it can get a bit "bumpy" when close to top value) since we had some boring aoustronaut wannabes that did nothing else than surfing the stratosphere. totally useless for the defending side when that happens. only thing i can remark about that code is that in reality it kicks in a bit before the actual setting, it is possible to reach the full height but it starts get "heavy" about 100 meters under top value

edit: oh and the default value (atleast in the maps i checked) seems to be 1000
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Physics.airDensityZeroAtHeight

Post by Apache Thunder »

I think the wind command would be great for "windy" maps. This effects sprites and particles so if you have a snow effect on a winter storm type map, adding wind would make the snow/rain fall less straight and more in the direction of the wind. (so you will get sideways falling snow if you set the wind high enough in one direction).
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

it had been even better if one could set the wind direction a bit random, like changing over time, but i guess thats a nogo
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Physics.airDensityZeroAtHeight

Post by fo0k »

this is freeking awesome.

I made a cessna challenge flying map (below.. old vid warning.. slightly better on 480p setting) and had an issue with it stalling at a high point in the map. This should help.. especially as I wanted to avoid tweaking the planes torque.. the rest (95%) of the map was perfect so it would spoil things. The challenge was pretty cool :)

Could this also move a person whilst they are walking around? Like on a thin ledge or something?

Also, where is this setting?

User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Physics.airDensityZeroAtHeight

Post by Apache Thunder »

The wind setting does effect any mobile object on the map. But it all depends on how high you set it. If it's set high enough it will effect soldiers movements too. (when I set it to 100 it blew me along with all the vehicles on the map in the direction I set it. The only reason I didn't fly off into oblivion with the vehicles was a house happened to be beside me. :P)

It will effect any moving object including particles and sprites. Just fine tune the settings until get what you want. Also note material friction will determine how much "wind" you will need for a soldier to get pushed around by it when on the ground or otherwise not in the air.

Also note this also effects the flight path of projectiles. ;)


And yeah I did try to add randomness to the wind via CRD_UNIFORM or CRD_RANDOM, but unfortunatly it did not work. :( So at this point it appears to be a constant setting and does not have any variation.

fo0k wrote: Also, where is this setting?
Describe what you mean? I am watching the video and not spotting what you meant yet....
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Physics.airDensityZeroAtHeight

Post by fo0k »

ahh I just mean which file do you edit this value in?

also just remembered I made an avatar way back of the interstate guys head.. much like yours ;)

Image
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Physics.airDensityZeroAtHeight

Post by Apache Thunder »

fo0k wrote:ahh I just mean which file do you edit this value in?

also just remembered I made an avatar way back of the interstate guys head.. much like yours ;)

Image
Lol nice. I just came up with the idea when I was playing around with my webcam. My chair is one of those chairs you can spin, so I decided to spin around and made a video of it. :P

Perhaps I can make a new one but instead use a greenscreen background (and better lighting) and remove the backgroun and replace it with a rotating cube with a texture on it to simulate the camera going around my head instead of my head doing the spinning.... :P

As for the physics command.

Ohhh...Well since your going to use this on a map per map basis you can put the code in the map's main init.con file. The code is not defined anywhere in the vanilla files so your pretty much free to put it anywhere. For mode specific chanages, place it in the map's OST con file instead.
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

Apache Thunder wrote:The wind setting
And yeah I did try to add randomness to the wind via CRD_UNIFORM or CRD_RANDOM, but unfortunatly it did not work. :( So at this point it appears to be a constant setting and does not have any variation.
found this, dont know what its for, but maybe it could help getting "random" wind type of experience?

Code: Select all

swayEnable
swayWindFactor

geometry.applySwayForce
geometry.applySway
edit: never mind :)

http://pilot51.com/wiki/GeometryTemplate.SwayEnable
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Physics.airDensityZeroAtHeight

Post by fo0k »

Heheh I played with that once on a map I did. Converted a car static to treemesh then had it hanging off the edge of a broken bridge.. 'italian job' style.. Just swaying away :)

@mamba.. The fov was extreme... Just for fun. I think I had only just found that setting when I made the vid
Post Reply