Jump to content
bi_mg

script command for Rotation Matrix needed

Recommended Posts

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 by bi_mg
explanation complement: vector unit circle; Parameters explaned more detailed

Share this post


Link to post
Share on other sites

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 by bi_mg
correction: scriptfunctions -> scriptcommands; add links

Share this post


Link to post
Share on other sites

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 by bi_mg
colored script commands; corrections
  • Like 2

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

×