08-05-2020, 08:55 AM
I assume that your object was already transformed by some other transformation or its parent was transformed. For example, if the parent is rotated by 90 degrees around y axis and you then add a translation along x axis, because of the parent rotation the object will be actually translated along z axis.
You can check your scene with stoping at a breakpoint, then opening Immediate Windows in Visual Studio and execute the following command there:
MainViewport.DumpHierarchy();
This will display the hierarchy of your 3D scene with details about each object. The transformations are displayed as matrices - if there is only translation applied (no rotation and no scale), then the first part of the matrix is: 1 0 0 0 0 1 0 0 0 0 1 0 - after that there is translation part: OffestX OffestY OffsetY 1
So check if the object that you are moving or any of the parent objects have some rotation or other type of non-translation transformation applied.
You can check your scene with stoping at a breakpoint, then opening Immediate Windows in Visual Studio and execute the following command there:
MainViewport.DumpHierarchy();
This will display the hierarchy of your 3D scene with details about each object. The transformations are displayed as matrices - if there is only translation applied (no rotation and no scale), then the first part of the matrix is: 1 0 0 0 0 1 0 0 0 0 1 0 - after that there is translation part: OffestX OffestY OffsetY 1
So check if the object that you are moving or any of the parent objects have some rotation or other type of non-translation transformation applied.
Andrej Benedik

