Get mesh info when touch other mesh

Hi!! its possible get the mesh when collision whit other mesh like cylinder? or i need a ray? i am really so newbi here the playground: Get mesh | Babylon.js Playground
like this:

Thanks in advance!!

Hi Abner.

Are you trying to create physics interactions in your scene? You might try reading through the documentation on physics. There are methods where you can pass callback functions upon collisions between mesh objects, to make something happen.

Documentation >Diving Deeper > Physics

what it says on the “moveWithCollisions” method is more to do with first person camera movements, whereas from the picture you posted, it seems like you wish things to happen upon collision between meshes. Browse through the playground examples shown on the right side of the page, they help a lot.

1 Like

Thanks for the help, I still do not plan to put physical, i found a partial solution whit intersectsMesh,
idk if is the best waybut works :joy:

partial solution see console log: Get mesh | Babylon.js Playground