I know how to get the values of Rotx, Roty and Rotz of the 3dWorld where I’m looking at. As I understood I can do that with TransformGet. But, as the title of this thread already implies am I in need of a ZScript function to ascertain the Rotation xyz values of the active tool itself, when a specific erea of the tool is facing the camera.;
I have found some workaround: With the mouse I turn the active tool so that the area of interest of the tool is facing the ‘Camera’/me, the onlooker.
TransformGet will give me the Rotxyz-values in relation to the Frontview. And these values I can use for:
[TransformGet,xPos, yPos, zPos, xSc, ySc, zSc, xRot, yRot, zRot]
[TransformSet, (Document:Width*.5), (Document:Height*.5), 0, 100, 100, 100, 0, 0, 0]
[IModSet,Tool eformation:Rotate,1] //Tool
eformationDimOpX
[ISet,Tool eformation:Rotate,xRot]
[IModSet,Tool eformation:Rotate,2] //Tool
eformationDimOpY
[ISet,Tool eformation:Rotate,yRot]
[IModSet,Tool eformation:Rotate,4] //Tool
eformationDimOpZ
[ISet,Tool eformation:Rotate,zRot]
This workaround is a little bit clumsy, because in most cases I need more than ones to reposition manually the area of interest really facing me, then again let the zscript recalculate and then I approach gradually the desired situation in which the area of interest is facing me WHILE I am in frontview.
That is the position in which I can do certain things with the mesh for which I make this zscript.
So, my question is, I hope, clear now: If I could directly measure the Rotxyz-values of the active tool itself, when the area of iterest is facing me, I could probably solve this riddle more directly by simply Rotating the tool back towards its Rot000-value?
Greetings, EddyL