FireWalker 329 Posted August 10, 2017 Is there a getPos command that will retrieve the rotation of an object? It looks to me that all the getPOS arrays only get horizontal coords and vertical heights without regard to the rotation that the object is sitting on. I'm thinking that if I snap (an ammo crate) to an angled surface that I should be able to retrieve those rotations while the mission is running (and set them back). getDir will give me the compass. Will one of the getEden commands retrieve angles (rotations)? Guess I need a getRot command... Thanks, Fire Share this post Link to post Share on other sites
pierremgi 4892 Posted August 10, 2017 vectorDir ad vectorUp, but not easy to use. See setVectorDirandUp for an idea on how it works. See also: surfaceNormal You have also the function: Bis_fnc_getPitchBank probably more convenient to use. Share this post Link to post Share on other sites
FireWalker 329 Posted August 11, 2017 @pierremgi Ok, thats why didn't see it. Totally stuck on the "g" command list. I'll mess around with it. I want it for use with inidbi2, so hopefully I'll just shuffle some commands around. I've just keep running into an issue where after ini writes the position back the objects look silly. I've been ignoring it for awhile, but feel like correcting it now... Thank you Share this post Link to post Share on other sites
scheintot2 12 Posted August 11, 2017 I have used something like this: _unit setDir (getDir _marker); Is this what you guys mean? wiki: https://community.bistudio.com/wiki/getDir https://community.bistudio.com/wiki/setDir https://community.bistudio.com/wiki/setFormDir Share this post Link to post Share on other sites
FireWalker 329 Posted August 11, 2017 2 hours ago, scheintot2 said: Is this what you guys mean? Not exactly. Those commands only get and set the position of objects/units relative to a flat plane and the relative elevation. If you look in the attributes of an object in the eden editor you will see there are three additional position boxes that are labeled "rotation". These allow you to also set the object to the surface. Think: "side of a hill". You can snap to that surface in the editor, but if you place the same item in the same spot with setPos, the item will be in the correct spot, but be sitting perfectly level. Pierremgi's commands do the job, I'm just not sure how easy it's gonna be to get the rotations to begin with. Haven't dove into it yet. Fire Share this post Link to post Share on other sites
7erra 629 Posted August 11, 2017 You can place the object you want to rotate on a seperate scenario and then get the vectorDirAndUp with this: _myVectorDirAndUp = [vectorDir cursorObject, vectorUp cursorObject]; And use this array on your desired object: _obj setVectorDirAndUp _myVectorDirAndUp; The BIS_fnc_getPitchBank and BIS_fnc_setPitchBank commands are easier to understand since you dont have to work with vectors. 1 1 Share this post Link to post Share on other sites