Setts of Gizmo color when events

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 :frowning: Who knows from where.

does it looks better with emissive color ?

gizmo._coloredMaterial.emissiveColor = BABYLON.Color3.Red();

:frowning: White color is still visible

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
try this:

gizmo._hoverMaterial.specularColor = BABYLON.Color3.Red();
1 Like

Yes, I tried various manipulations, but now it’s red, really red, thank you :slight_smile: 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.

1 Like