On mouse click action

Hi Guys,

Here is a space I created

And now i want this Yeti to appear when I click on the carpet mesh…!!! and disappear when i click again

How do i do that.??
I do not know what exact terminology to say this… any help please :grimacing:

This is a perfect task for the pointer support and picking. You can read about it here - Interacting With Scenes | Babylon.js Documentation

Notice that pointerInfo also provides you with the mesh you have clicked on (in case a mesh was clicked on and is pickable).

3 Likes

Thats a really cool thing

But could you really add some code of line in this scene and show me how it should be done plz.

I m really getting confused how should i add that
“when i click the carpet Yeti should appear and when i click the carpet Yeti should disappear”

hi @AD_Kar

here a simple solution for you:

3 Likes

wow thnq so much :heart_eyes: