I have a problem where geometry in children nodes to pickTargetNode aren't being picked in this here line:
Is there something one has to do to enable children picking?
There is an RFE in the issue tracker for enhancing these methods to allow for returning the triangle in world coords among other things. For now you might take a look at Geometry's getWorldCoords method which shows how to properly transform a vector to world coords.
I was wrong, the child is being picked. :// I didn’t get the result because i made my own intersection method that mathematically checks the intersection between a ray and the triangles of the pickResult. The problem is that I get the triangles through pickresult.getData().getTargetMesh().getTriangle() and these positions are the local positions in the parent. If the parent has been moved, rotated or scaled these numbers are uneffected by this.
So now I need some way to calculate the the world position of the triangle based on the parents position, rotation, and scale. Is there some method for rotating a Vector3f?
Thanks, I'll take a look at getWorldCoords(). Meanwhile I found some old posts and solved it this way:
Vector3f worldPoint = (parent.getLocalRotation().toRotationMatrix()).mult(triangle[k]);
worldPoint = worldPoint.add(targetMesh.getWorldTranslation());
//will add scale
Thanks alot renanse