Get Co-ordinate value for a tube while hovering in react-babylonjs

Creating a tube by passing an array on co-ordinate values,
From canvas, while hovering to a particular tube, need to highlight
How can we get the particular co-ordinate set while hovering for tube?

Adding @brianzinn the brillant mind behind the react integration.

If you just need to trigger code from hovering there is a useHover hook:
epic-darwin-tohk0 - CodeSandbox

You get a callback with hover and when unhovered. Is that what you are looking for? You can also use pointer events with picking rays. Not entirely sure what you mean by co-ordinate set. If you are trying to get a co-ordinate on your tube - have a look at pointer down event with picking predicate and pickedPoint:
Drawing HTMLCanvasElement as Decal | Babylon.js Playground (babylonjs.com)

1 Like