What does CollisionResults.getClosestCollision().getGeometry return??

Hi,
I have two fundamental doubts.

  1. In scene explorer, we generally have a scene like “beer_orgemesh” and a number of subgeometries like “beer_orgemesh-geom1”, “beer_orgemesh-geom2” etc. Whether “beer_orgemesh” a node?? It is supposed to be a node but when I get the results of getGeometry as above I can easily pass that to a function accepting a Geometry (I have checked it by printing it as well). I can’t so similar thing for the main scene of the model, it says mall_orgemesh is a Node while function is expecting a Geometry.

  2. When I get result from getGeometry(), in case of beer object I get the result as “beer_orgemesh” and in case of mall(scene), I get result as one of subgeometry “mall_orgemesh-geom2”. How do we know in advance whether we are going to get a scene node or subgeometry.

You don’t, if you did you wouldn’t need to pick would you?

@normen said: You don't, if you did you wouldn't need to pick would you?

Depends sometimes I want to pick a complete node of things, like one complete spatial.

@simar.i3r said: Depends sometimes I want to pick a complete node of things, like one complete spatial.

But if you knew in advance what you get when you pick then why pick in the first place?

It returns the geometry that was hit. You can get the parent of the geometry until you get something you recognize.

They are likely different geometries because they have different materials.