How to get Node from CollisionResult?

'Ello! Is there any way to get the Node from CollisionResult? So far, I have:

[java]

CollisionResults collisionResults = new CollisionResults();

Ray ray = new Ray(foo.getCamera().getLocation(), foo.getCamera().getDirection());

foo.getWorld().getBlocks().collideWith(ray, collisionResults);

CollisionResult closestResult = collisionResults.getClosestCollision();

[/java]

So, now, how do I get the Node that first collided (I mean, the first from getClosestCollision()) with the Ray?



I could use getGeometry(), but it wouldn’t fit my need… The thing is the block returned as the closest in collision will be removed or moved within the BlockNode (which is returned in getBlocks()).



P.S. BlockNode contains Block’s, which, speaking further, contain Geometries (different, not only cubes).



Thanks in advance,

Lucas

The Geometry is the child of a Node usually. getParent() will give you that node.



Though as an aside, if this is a minecraft style world this approach will never scale since block worlds are not made of blocks.