i use the gizmo to rotate the mesh,disabled some axis,
as you saw,the circle is x-axis of rotation,but when i rotate,the plane showed looks like other axis(not x-axis)
maybe it is hard to creat a playground,
but it seems triggers other axis’s dragEvent.
when i open other axis and only rotate x-axis,that’s true
but,why?i disabled others:
I modify it with my project’s way,it doesn’t cause the issue.
It may be the subsequent business logic that causes the problem,i am debuging it,I will update my progress later
The issue I found is the mesh rotation is changed while using the gizmo. It’s a edge case. If while dragging the gizmo, no modification happens, it should be fine.
In fact,in my case,i set the attribute after draged;
onDragEndObservable.add(_=>{
setAttribute...
})
not in the process of dragging.
there are 5 points,i drag a point by gizmo,so i need calculate the interpolation of others according to the offset (10deg),
after that,i get the new offsets:
0deg,5deg,10deg,5deg,0deg
then,i apply them by hand again
for(var i =0;i<5;i++){
var point = points[i];
if(point != currentGizmoPoint){
point.rotation = new BABYLON.Vector3();
point.addRotation(0,0,point.offsetRotation)
}
}
now,I circumvented the problem with a judgment
I wonder if there is another way, or if this is a bug that can be fixed
It’s not what I was thinking. Can you please record a video? If you add rotation to the meshes that are not linked to a gizmo, it should not desync the display plane.