![]() |
ModelrotatorVisual3D - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: ModelrotatorVisual3D (/showthread.php?tid=4181) |
ModelrotatorVisual3D - kreativasas - 03-24-2020 Hi, I'm using a modelrotator with a standardTransform3D to rotate objects. I follow the example ducks lake but i can't find where is defined the rotation center!! Somebody can help me? RE: ModelrotatorVisual3D - abenedik - 03-25-2020 StandardTransform3D always rotates around (0,0,0). This means that to rotate (and scale) your model correctly, the model (its mesh) needs to be defined in such a way that the center of the model (mesh) is at (0,0,0). If you put a breakpoint to a line after the _duckModel3D is loaded and when the breakpoint is hit open the Immediate window. There write the following: _duckModel3D.Dump() and you will get the details about the model - for example (here is only the first part): Code: Bounds: X: -0.16 Y: 0.00 Z: -0.11 So the center of the duck is at (0, 0.15, 0) - ok when rotating around vertical axis (0,1,0). Note that if you have a more complicated hierarchy of objects, you can also use _duckModel3D.DumpHierarchy() RE: ModelrotatorVisual3D - kreativasas - 03-25-2020 (03-25-2020, 03:02 PM)abenedik Wrote: StandardTransform3D always rotates around (0,0,0). I'm not sure that i understand it correctly. But i don't need to rotate the obj using his center but i need to rotate it using a fixed point on the view. Is it possible? Maybe using a RotateTransform3D? RE: ModelrotatorVisual3D - kreativasas - 03-25-2020 Thanks! Solved using RotateTransform3D |