Tooltip on hover

I’m interested in having a tooltip appear on hover for the box and the front wheel from the loaded mesh. At the moment they have an outline hover state but I don’t know how to create the tooltip. Any ideas greatly appreciated.

https://www.babylonjs-playground.com/#YIU90M#51

Cheers!

I played with that thing a month ago.

https://www.babylonjs-playground.com/#XCPP9Y#1403

You need to use BABYLON.GUI as seen in example. I hope that helps you.

2 Likes

Ah nice, thanks very much, I’ll take a look

nice one! you should contribute this one as part of the GUI!

With your code I had a go at creating tooltips for multiple objects with a hover state for each, but got as far as two of them activating on the same object on mouseover. Any ideas how I can separate them?

https://www.babylonjs-playground.com/#YIU90M#62

Sorry, I’ve got a lot to learn, cheers

https://www.babylonjs-playground.com/#YIU90M#64

you should prolly make a function to unset and do the animations as well that iterates though an array of your objects and ignores or flags meshes depending on the hover event

3 Likes

Excellent, thanks very much!