Jump to content
Sign in to follow this  
kingjod

How to tilt buildings on its axis.

Recommended Posts

How do you tilt building in the 3d editor?

---------- Post added at 12:36 ---------- Previous post was at 12:34 ----------

For multiplayer making . not the single player.

Share this post


Link to post
Share on other sites

I think only VBS can do that, no rotational tilt in the ArmA version. Objects will tilt to match the terrain though, for hillsides and the like. You can also change it via functions as well, but no mouse/key command.

Share this post


Link to post
Share on other sites

Not sure if this function will work on houses...but you can try it.

fn_orientObject.sqf

/*

call with: nul = [object,direction,angle,pitch] call fn_orientObject

*/

private ["_obj","_dir","_ang","_pit","_vecdx","_vecdy","_vecdz","_vecux","_vecuy","_vecuz"];

_obj = _this select 0;
_dir = _this select 1;
_ang = _this select 2;
_pit = _this select 3;

_vecdx = sin(_dir) * cos(_ang);
_vecdy = cos(_dir) * cos(_ang);
_vecdz = sin(_ang);

_vecux = cos(_dir) * cos(_ang) * sin(_pit);
_vecuy = sin(_dir) * cos(_ang) * sin(_pit);
_vecuz = cos(_ang) * cos(_pit);

_obj setVectorDirAndUp [[_vecdx,_vecdy,_vecdz],[_vecux,_vecuy,_vecuz]];

true

In your init.sqf add...

fn_orientObject = compile preprocessFileLineNumbers "fn_orientObject.sqf";

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  

×