Jump to content
Sign in to follow this  
LoonyWarrior

set direction.. down?

Recommended Posts

hi

how can i set direction "down"?

when i create shell 50m above the ground..

_vehicle = "M_Mo_120mm_AT_LG" createVehicle [(_position select 0), (_position select 1), 50];

how to instruct it to go down ?

Share this post


Link to post
Share on other sites
_vehicle = "M_Mo_120mm_AT_LG" createVehicle [(_position select 0), (_position select 1), 50];
_vehicle SetVectorUp [0,90,0.001];

Share this post


Link to post
Share on other sites

oki i found the solution...

befor i started this thread i tryed setVectorDir and setVectorUp ...and it didnt work

but later i tryed setVectorDirAndUp and it does the magic..

so if u want hit player with 'grenade' spawned in the air......

   _position = getPos player;

   _vectorDir = vectorDir player;
   _vectorDirX = (_vectorDir select 0) / 100;
   _vectorDirZ = (_vectorDir select 1) / 100;

   _vehicle = "M_Mo_120mm_AT_LG" createVehicle [_position select 0, _position select 1, 100];
   _vehicle setVectorDirAndUp [[_vectorDirX, _vectorDirZ, -1], vectorUp player];

---------- Post added at 21:10 ---------- Previous post was at 20:20 ----------

_vehicle = "M_Mo_120mm_AT_LG" createVehicle [(_position select 0), (_position select 1), 50];
_vehicle SetVectorUp [0,90,0.001];

:( oki this works too, i made some mistake befor..

just for sure... its [0, 1, 0.001]

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  

×