ManDay 0 Posted July 7, 2007 Beside that I don't understand why we should need 2 Vectors to define an objects position in space I cant figure out how this works in ArmA. If I only use VectorUp it works fine. For the example of a soldier the vector which is beeing aligned goes straight from feet to head of him. As vectors-sizes become redundant and less efficient when used as rotation indicators there is need for a forth (fifh) indicator. I guess that will be Vector-Dir: To rotate the Object arround the axis which has been aligned with VectorUp. Now I thought if I make the vectorDir poiting straight into the direction i want the soldier to look it would work: <span style='font-size:15pt;line-height:100%'>V</span>Dir <span style='font-size:15pt;line-height:100%'>= V</span>Up <span style='font-size:15pt;line-height:100%'>x (V</span>Up <span style='font-size:15pt;line-height:100%'>x -E</span>Z<span style='font-size:15pt;line-height:100%'>)</span> Now it all should work fine. VectorUp going right along the soldiers spine and VectorDir springing right out the soldiers face... Put it's still not the exspected result. Any hints on VectorDir? Share this post Link to post Share on other sites
fasad 1 Posted July 7, 2007 Unfortunately setVectorDir seems to assume you want the model Z (vertical) lined up with the world Z, making it a vector variant of setDir... As far as I can tell, the Z component in setVectorDir does nothing. Set the dir/vectorDir first to give the object facing, then use setVectorUp to set pitch and bank. Share this post Link to post Share on other sites
ManDay 0 Posted July 8, 2007 Hey Fasad, yes I did that already. Now it works fine with most of the angles. But as soon as I set the VectorUp close to -Ez ( -[0,0,1] ) there occurs confusion again. I ll recheck my formulas but I'm quite sure it has to do with arma. PS: I really mean "close" and not "equal" Share this post Link to post Share on other sites
fasad 1 Posted July 8, 2007 Can you explain what this -Ez is? What do you expect, and what is happening? I've only "tested" these commands, but they seem to work as expected for me. Share this post Link to post Share on other sites
ManDay 0 Posted July 8, 2007 Well in english maths it should be k^ (Z/W/K unit vector) it supposed to make the object face downwards - depending on its vectorup. just check the cross produkt of those and you will see. Ez = Einheitsvektor-Z ^= k^ = Unitvector Z Share this post Link to post Share on other sites
fasad 1 Posted July 8, 2007 It's been about ten years since I last did any vector multiplication Back to ArmA, I think I see what you mean. I guess it is caused by mis-orientation of the object since the vectorUp is being set very close to the vectorDir? I found that setting the vectorUp to straight up [0,0,1], then using setDir, then setVectorUp could repeatedly create the desired object alignment. Eg, chopper nose pointing (almost) straight down, tail up, rotor shaft pointing east. Share this post Link to post Share on other sites
ManDay 0 Posted July 8, 2007 Yeah right. Im just striggling with those specific "exceptions". No, vectorDir is alway set normal to vectorUp. just see wikipedia or somewhere there you have a picture what V x V will result in. Share this post Link to post Share on other sites
ManDay 0 Posted July 10, 2007 !!! Can NOONE give an ABSOLUTE help with reagrds to that confusing stuff? It's so annoying that crap doesnt work. € a calculation error - that seemed to be all. i think its solved. Share this post Link to post Share on other sites