Hi, I’m using the class: AxisDragGizmo. Is there any way to prevent the color from changing when the mouse cursor hovers over the gizmo when I grab the gizmo …? Simply I want to have the same color of gizmo every time, thanks for your time.
There is no public accessor but you can do it by changing diffuseColor of the different materials:
check lines 25-27
Hi, thank you for your response. At first glance, it looks fantastical. The problem is that under the color red you can see white or gray color Who knows from where.
does it looks better with emissive color ?
gizmo._coloredMaterial.emissiveColor = BABYLON.Color3.Red();
I don’t get any white on the gizmo.
Same PG as I linked?
Yes, the same PG. You must play with it for a while (change angle of view, moving…) and you will see white ghost.
I got it once on on hover
gizmo._hoverMaterial.specularColor = BABYLON.Color3.Red();
Yes, I tried various manipulations, but now it’s red, really red, thank you If I can, I have one last question with the mentioned class: AxisDragGizmo . When creating an object:
var gizmo = new BABYLON.AxisDragGizmo (new BABYLON.Vector3 (1,0,0), BABYLON.Color3.Red (), utilLayer);
Can I later enter a new direction vector, e. G .: in our case we have: 1, 0, 0 …I want change it to 2, 5, 2? Is there a way to change this vector after creating the object? Change to another coordinate? Thank you.
I don’t think so, you will have to dispose the gizmo and create a new one.