Jump to content
Nicoman35

Do vehicles take no fall damage?

Recommended Posts

I am in the editor, a few vehicles around me.

I point at one vehicle and I local exec this via debug console:

 

TeleportUp = {
	params [["_vehicle", objNull]];
	_vehicle setPos (getPos _vehicle vectorAdd [0 ,0, 500]);
	while {getPos _vehicle #2 > 15} do {
		hintsilent str (velocity _vehicle #2);
		sleep 0.1;
	};
}; 
[cursorObject] spawn TeleportUp;

Question: Why does the vehicle take no damage, when hitting the ground?

Share this post


Link to post
Share on other sites
22 minutes ago, Nicoman35 said:

I am in the editor, a few vehicles around me.

I point at one vehicle and I local exec this via debug console:

 


TeleportUp = {
	params [["_vehicle", objNull]];
	_vehicle setPos (getPos _vehicle vectorAdd [0 ,0, 500]);
	while {getPos _vehicle #2 > 15} do {
		hintsilent str (velocity _vehicle #2);
		sleep 0.1;
	};
}; 
[cursorObject] spawn TeleportUp;

Question: Why does the vehicle take no damage, when hitting the ground?

instead of that it will explode instantly if parked or spawned near another vehicle in multiplayer^^

The serious answer is: Arma 3 physics is a mess.

I assume it has to do with some strange optimizations around mass calculations through the game engine. But the community can't really answer this. An Arma 3 physics developper could...

Share this post


Link to post
Share on other sites

Meh. Do I really have to make a function controlling the damage in my vehicle paradrop script? I had hoped the error was somehow on my side. Oh well.

Share this post


Link to post
Share on other sites

I got a math problem regarding my vehicle paradrop.

I simulate the fall break of the parachute by gradually reducing it's velocity.

The fall break distance is influenced by vehicle mass and vehicle velocity the moment the parachute is opened.

I know, that the vehicle will reach terminal velocity when falling for about 1200 m.

Dependent on vehicle mass,  the opening height MUST occur at a height of 120 m to 900 m above ground.

But this is only valid, if the vehicle is alreay falling with terminal velocity, meaning it was already falling for 1200 m.

If the distance from releasing of the vehicle to parachute opening is less than 1200 m, vehicle's velocity will be lower than terminal vlocity.

My target is: Deploying the paracute early enough, so that the vehicle does not hit the ground with high speed, but not too early, as vehicles floating several hundred meters above ground is not too good.

 

What I got so far:

private _vehicleMass = getMass _vehicle;
private _deployHeight = round(((_vehicleMass / 1000) max 1) * 120) min 900;  					// 120 - 900
_deployHeight = (((((getPos _vehicle #2 - _deployHeight) min 1200) / 1200) min 1) max 0.3) * _deployHeight;		// fail

Anyone got a solution?

If you need more info, here is the gitHub link to my current work.

Share this post


Link to post
Share on other sites

if I understood your problem then you want to know the lowest height for opening the parachute.

 

What you should have already is the deceleration value for your vehicle while falling with opened parachute.

Also you should know the maximum touch down velocity to not get your vehicle destroyed.

If you have all of this then this should do it:

 

private _vec = your vehicle
private _a = your Deceleration value (dependent on vehicles mass)
private _maxSpeed = your touchdown maximum speed

private _v_z = ( velocity _vec ) select 2;

private _time = (_v_z - _max_speed) / _a;

private _height = _a * _time^2

Decelaration value should be a positive value to work with this formula.

I just put the formula together but I didnt calculate anything. Therefore this should be the solution but I'm not sure because I didnt verify it.

 

Edit: velocity value of the vehicle when falling is negative I assume. The formula needs a positive value. But I guess you ll solve this^^

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for the suggestion, will have a look. Currently I see all kinds of variables spinning around my head. Must take a break. 

Share this post


Link to post
Share on other sites
private _v_z = abs((velocity _vec) select 2); 

using 'abs' will convert your negative value into positive values, it's handy when dealing with such matters.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×