Wanted to point out that the new PlaneRotationGizmo system is pretty cool (it shows the angle difference), however it does impact performance quite a bit. The drawing of the angle diff is executed per frame via Mesh.createRibbon.
The implication is that it would cause significant frame drops in lower end devices, as it did for a laptop of mine.
Indeed, after a performance profiling on a simple scene, this function happens to be the biggest source for the total ‘scripting’ time, even more than rendering.
Also some suggestions about the PlaneRotationGizmo code: would be really helpful to
expose the dragDistance as a public variable or getter
flag to not actually rotate the gizmo.
Developers may need know the drag distance while rotating a fixed gizmo. Another use case is rotating a node in global mode so that the underlying node rotates but the gizmo does not. I believe Unity is already doing this for global rotations/translations!
I can confirm the ribbon computation is pretty CPU intensive. When I lower the tesselation value it gets way faster but the edges are clearly visible. Can you use a custom shader or NME to fix that performance issue @davegould41 ?
flag to not actually rotate the gizmo.
Can you elaborate on this one? Can you just not disable the gizmo when you don’t want to rotation?
Just tested out the latest gizmo, definitely more performant!!
Btw, there is a display bug: the angle display is actually moving to the opposite of the mouse drag!
Also, would it be possible to make the accumulated angle in this line of code as a public variable, so that developers using the gizmo can access it? Cheers!!
This is just one example, I’ve noticed it going the other way round at some times. Probably to do with the relative camera rotation to the node? Also using scene.userighthandedsystem = true. It was working fine in the previous build haha
Also is it possible to make the accumulated angle of the rotation drag as a public variable (a value that is agnostic to the relative camera position), so that developers using the gizmo can access it? That would be super super helpful!!
E.g. I move the rotation gizmo by 90 degrees, would be really cool grab this 90 degrees data from the gizmo during dragStart, drag + dragEnd