_SCAR 139 Posted September 12, 2017 All, I'm trying to set the altitude of a pipe (class is Land_IndPipe1_20m_F). The pipe is oriented to terrain normal. The issue is that the pipe's inclination gets completely messed up. This is the pipe in the editor: This is the pipe after setting its altitude from a script: Things I've tried: _currentPipe setPos [getPos _currentPipe select 0, getPos _currentPipe select 1, _altitude]; _currentPipe setPos (_currentPipe modelToWorld [0, 0, _altitude]); _currentPipe setPosATL (_currentPipe modelToWorld [0, 0, _altitude]); _currentPipe setPosATL [getPosATL _currentPipe select 0, getPosATL _currentPipe select 1, (getPosATL _currentPipe select 2) + _altitude]; _currentPipe setPosASL [getPosASL _currentPipe select 0, getPosASL _currentPipe select 1, (getPosASL _currentPipe select 2) - _altitude]; To no avail. ...Any ideas? Thank you, _SCAR Share this post Link to post Share on other sites
_SCAR 139 Posted September 12, 2017 Ok answering myself here. I guess this has to do with the fact that this object is primarily oriented at SEA level, hence the issues if you use it with TERRAIN orientation. I don't know, 50% of Arma programming is random guesses. This fixes it (edit: no it doesn't) _currentPipe setPosATL [getPosATL _currentPipe select 0, getPosATL _currentPipe select 1, _altitude]; _currentPipe setVectorUp surfaceNormal position _currentPipe; 1 Share this post Link to post Share on other sites
_SCAR 139 Posted September 15, 2017 Not really, no. Still I don't understand why this moves the object: _obj setPos (getPos _obj); ...anyone cares to explain it to me...? Thank you, _SCAR Share this post Link to post Share on other sites
_SCAR 139 Posted September 15, 2017 Thinking this might be a problem of collision, I even tried: _obj setVehiclePosition [getPos _obj, [], 0, "CAN_COLLIDE"]; which also moves (and rotates) the object. WTAF. Share this post Link to post Share on other sites
_SCAR 139 Posted September 15, 2017 Going further: running this multiple times MOVES THE OBJECT everytime this is called: _obj setVehiclePosition [[9242, 1009, 0], [], 0, "CAN_COLLIDE"]; Share this post Link to post Share on other sites
_SCAR 139 Posted September 15, 2017 Ok for anyone curious, I found the *only* one that works: _obj setPosWorld getPosWorld _obj; 1 Share this post Link to post Share on other sites