08-02-2024, 10:23 AM
Hi,
I wanted to report a problem in the Ab3d samples, in particular in the section "ModelMover and ModelRotator" which refers to the file ModelMoverAndRotatorSample.xaml.cs.
If I initialize the variable "_zAxisAngleRotation3D" with the z axis and an angle of 90 degrees i.e. I apply to the object an initial rotation of 90 degrees around the z axis, then there are some problems with the rotation. For example, if I rotate the object around the x axis, it rotates around another axis different from x.
I think that the problem is in the following line:
"_transform3DGroup.Children.Insert(_transform3DGroup.Children.Count - 2, rotateTransform3D) "
The comment before this line tells "insert before TranslateTransform3D" but in order to insert before TranslateTransform3D I think that the index should be "_transform3DGroup.Children.Count - 1". If I implement this modification, then I have no more problems with the rotation.
Thank you for your time,
Matteo
I wanted to report a problem in the Ab3d samples, in particular in the section "ModelMover and ModelRotator" which refers to the file ModelMoverAndRotatorSample.xaml.cs.
If I initialize the variable "_zAxisAngleRotation3D" with the z axis and an angle of 90 degrees i.e. I apply to the object an initial rotation of 90 degrees around the z axis, then there are some problems with the rotation. For example, if I rotate the object around the x axis, it rotates around another axis different from x.
I think that the problem is in the following line:
"_transform3DGroup.Children.Insert(_transform3DGroup.Children.Count - 2, rotateTransform3D) "
The comment before this line tells "insert before TranslateTransform3D" but in order to insert before TranslateTransform3D I think that the index should be "_transform3DGroup.Children.Count - 1". If I implement this modification, then I have no more problems with the rotation.
Thank you for your time,
Matteo