bi_mg 7 Posted July 29, 2020 (edited) Hello awesome Dev Guys ๐, I'm working on an export/import compositions surrounding an object. The framework can exclude/include categories of classtypes wich will be grabbed in further. Situation: It bothers me that not any of the script commands is used for the calculation of the position relative to the center.modelToWorld/worldToModel or attachTo needs an anchor object - an heavy parameter - and not a position which is just a vector - a lightweight parameter. The parameter or return value is the PositionAGL, depending on the situation. For many reasons it surely be usefull. But not in this case that I described. I have found a few scripts to serve that what I searched for in the Arma 3 Function Library. Slow Solution: I developed a simple script that exacly do that in but not so fast. It uses vectorWorldToModel for PositionRelative and PositionWorld with a unit circvle vector and dose not use PositionAGL. In that case my script should be used at the mission init and not in runtime. I present my framework later, it's not ready. Wish: Can you develop the descriped script command which uses PositionRelative Vector e.g. and Orientation Vector of unit circle e.g. as parameters. It returns a new PositionRelative calculatet from the rotation matrix, relative to the two vectors, no matter which positiontypes, to increase the performance? It is justg a wish ๐. I hope to see more awesome stuff of you all like Arma 3 Contact ๐คฉ. bi_mg Edited July 29, 2020 by bi_mg explanation complement: vector unit circle; Parameters explaned more detailed Share this post Link to post Share on other sites
killzone_kid 1333 Posted August 1, 2020 Have you looked at https://community.bistudio.com/wiki/matrixMultiply and https://community.bistudio.com/wiki/matrixTranspose already? Share this post Link to post Share on other sites
bi_mg 7 Posted August 2, 2020 (edited) Hi killzone_kid, yes I did, long ago. The combination do what I expect. But it is a combination of two script commands. Because of the script that does it, there will be a loss of performance, for sure. I've not benchmark the combination in script, sry. I wish for one script command that does the rotation for better performace in the mission runtime and not in the mission inititialization, as I said. I developed Rotation Matrix with the use of vectorWorldToModel and shrinked and expand unit circle vector. trigonoetric commands sin, cos and so on and the rotation is integrated in the command vectorModelToWorld. I think it is a better way with the given commands by now, but I'm really not sure as a user not as an Arma 3 Developer ๐. PS: It's a shame that I never lerned eulers angles and rotation matrix ๐ญ, only awesome Curve sketching and Integrals in detail ๐ and superficial vectors and matrices ๐. Edited August 2, 2020 by bi_mg correction: scriptfunctions -> scriptcommands; add links Share this post Link to post Share on other sites
bi_mg 7 Posted August 5, 2020 (edited) I'm very sorry! I found out by now, that the script command vectorModelToWorld with the parameter PositionRelative "seems" to do what I exacly needed. I don't need the rottion matrix anymore, because it is all in the described script command. I'm realy sorry for bother. mg Edited August 5, 2020 by bi_mg colored script commands; corrections 2 Share this post Link to post Share on other sites