Posts: 94
Threads: 32
Joined: Nov 2019
Reputation:
0
hi guys,
i need an help.
i use modelscalar and it works.
but if i rotate the object (and rotate the modelscalar with the obj) i need to transform not only 1 axe but 2 or 3 (it depends by the rotation) to don't morph the object.
How i can do?
Posts: 766
Threads: 8
Joined: Sep 2009
Reputation:
58
The order of transformations is important. If you first rotate the model and then scale it, then the rotated model will be scaled and this can stretch the model in a way that is not intended.
To apply multiple transformations first check that the center of the 3D model is at coordinates (0, 0, 0) - around this point the model will be rotated and from that point the scaling will be applied. This is also called a pivot point. If the pivot point is somewhere else, then you can first apply a translation to move the center to that point.
Then add scale transformations, after that add rotation and finally add a translation.
You can also use StandardTransfrom3D that comes with Ab3d.PowerToys and is not a transformation from WPF 3D objects model. This requires a different usage pattern - see the "Utilities / StadardTransform3D sample" for more information.
Andrej Benedik
Posts: 94
Threads: 32
Joined: Nov 2019
Reputation:
0
ok but i need to apply many transformation:
first i need to move, then rotate and at last scale....
so when the obj is scaled it stretches.... is there a way to scale the obj after rotation without stretching it?