Question About Turn Picking Mode On/Off

Hi guys!!!
I was trying to use the inspector picking mode, I found some troubles.
When turning picking mode on, bbl pick mesh by isVisible instead of pickable, is there any way to make it pick by pickable?
Is there any callback for picking? like
xxxxx.onPick = (node:Node)=>{
if(node.name===“collider”)
{
return node.parent;
}
return node;
}
If node.name is “colldier”, the scene explorer highlight node.parent instead of node

A repro in the playground would be an amazing start point as I am having trouble to fully understand the question

Hi, I create one PG https://playground.babylonjs.com/#J1HUMQ#2



Q: How to achieve picture one when inpector pickable turn on? or how to get inspector picking on/off state ?

I find those states store in SceneTreeItemComponent, how to get/set them by hand?

You should not and probably won t have access to internal states.

In your case the issue is that your ray will first collide with the enclosing collider whom parent is root so you can not pick the children. You should probably discard this collider in your predicate.

2 Likes