Jump to content
Sign in to follow this  
killjoe_R3F

[SOLVED] BIS_fnc_setPitchBank (SetVectorUp) interference with physX

Recommended Posts

I try to force a mortar on an horizontal position whatever slope it is On.

 

For sure I tried 

[(vehicle player), 0, 0] call BIS_fnc_setPitchBank; 

or

 (vehicle player) setVectorUp [0,0,1] ;

even with a 

(vehicle player) enableSimulation false;

It works for half of a second then go back to Normal position to the slope.

 

Any ideas how I could force the mortar on that horizontal position ?

Share this post


Link to post
Share on other sites

I did and it is better but not satisfying.

I mean Yes the mortar is horizontal but the anim of the player geting in is spoiled. Stll standing near the mortar , and able to fire.

I keep seerching.

 

Thanks for your answer.

Share this post


Link to post
Share on other sites

Nobody else has an experience to soluce the problem?

 

Excepted the "trick" unligned by Sarogahtyp, witch I will adopt for sure if nothing else exists.  ;) 

Share this post


Link to post
Share on other sites

OK the solution I have choosen to set a mortar on horizontal position (levelling) is :

 

1. Make script with an attachTo to a created invisible H Pad.

2. Call that script by an addaction after the getInGunner

 

1. Make script with an attachTo to a created invisible H Pad.

R3F_FNC_LEVELLING = {
	if ((isNull (vehicle player)) && !(alive player) ) exitWith {};
	private ["_support"];
	_support = createVehicle ["Land_HelipadEmpty_F", player modelToWorld [0, 1, 0], [], 0, "CAN_COLLIDE"];
	_support setDir (getDir player);
	_support setVectorUp [0,0,1];
	(vehicle player) attachTo [_support,[0, 0, -0.1]];
};

2. Call that script by an addaction after the getInGunner

MyMortar addAction ["Levelling", {[] spawn R3F_FNC_LEVELLING; (_this select 0) removeAction (_this select 2);},"",2,true,true,"","typeOf (vehicle player) == 'ClassMyMortar' && alive player"];

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
Sign in to follow this  

×