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:


and you will get the details about the model - for example (here is only the first part):

Bounds: X:       -0.16  Y:        0.00  Z:       -0.11
       SizeX:    0.32  SizeY:    0.30  SizeZ:    0.22
Center: X:        0.00  Y:        0.15  Z:        0.00

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()
Andrej Benedik

Messages In This Thread
ModelrotatorVisual3D - by kreativasas - 03-24-2020, 07:42 PM
RE: ModelrotatorVisual3D - by abenedik - 03-25-2020, 03:02 PM
RE: ModelrotatorVisual3D - by kreativasas - 03-25-2020, 03:21 PM
RE: ModelrotatorVisual3D - by kreativasas - 03-25-2020, 03:58 PM

Forum Jump:

Users browsing this thread:
1 Guest(s)