Search the Community
Showing results for tags 'modeltoworld'.
Found 2 results
-
Getting a position towards the movement of a unit/vehicle?
LSValmont posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I have been using this fnc to control the movement of dog agents: vRunnerChargeFeral = { params["_dog","_dogSpawnPos","_runner","_dogTarget"]; _pos = getPos _dogTarget; switch (true) do { case (speed _dogTarget > 2 && speed _dogTarget < 4): {_pos = _dogTarget modelToWorld [0,3,0];}; case (speed _dogTarget > 4 && speed _dogTarget < 6): {_pos = _dogTarget modelToWorld [0,7,0];}; case (speed _dogTarget > 6 && speed _dogTarget < 10): {_pos = _dogTarget modelToWorld [0,12,0];}; case (speed _dogTarget > 10 && speed _dogTarget < 15): {_pos = _dogTarget modelToWorld [0,16,0];}; case (speed _dogTarget > 15): {_pos = _dogTarget modelToWorld [0,20,0];}; default {_pos = _dogTarget modelToWorld [0,1,0];}; }; if (isAgent teamMember _runner) then { _runner moveTo _pos; } else { _runner doMove _pos; }; }; }; The problem is that when the _dogTarget is walking/running backwards the Dogs never reach the target. Is there any way to get a position towards the direction of the movement of a unit instead of the direction of the unit itself? -
modelToWorld and snap item to surface?
Charles Barkley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey everybody, I am working on my first script and unfortunately can not find any results at google or in here for a specific question. I hope it therefore is actually possible! Please consider following script snippet _tent = _tentType createVehicle [0,0,0]; 'tent spawned to world' call ReconMod_fnc_log; _tent setpos (_caller modelToWorld [-5,5,0]); 'tent moved to player position' call ReconMod_fnc_log; And this is how the tent spawns. I would like to have it snapping to the surface. When I try so spawn it on a hill or something it happens to disappear completely- 3 replies
-
- modeltoworld
- surface
-
(and 1 more)
Tagged with: