Heatmap meshclick

Hi everyone,

I’m creating a heatmapenvironment of a greenhouse. The heatmap is based on 4 layers in separate rows. At the end of the project, every box with a color gets a calculated value. To give users extra info about the data I want to make it possible to click on a block and when a block has been clicked, the value of that block must appear in the textblock.
With steps what I want:

  1. user clicks on RHeatblok1, RHeatblok2, RHeatblok3, DHeatblok, LHeatblok1, LHeatblok2 or LHeatblok3
  2. The value of the block must appear in the textblock: “valuebox”

Can somebody help me with that?

https://playground.babylonjs.com/#0TM95Q#22

How will you define the click at RHeatblok1 or RHeatblok2, for example? For me it seems that you need either use mesh.metadata for later check or create Transform node with all relevant children meshes (so you may detect the parent with clicking on any children mesh).

For picking interactions, one way is using Actions Actions | Babylon.js Documentation (babylonjs.com) or Raycaster Mesh Picking | Babylon.js Documentation (babylonjs.com)

1 Like

Thanks, after the hint of metadata I did some research and I solved it now. Thanks!!

3 Likes