Page 1 of 1

Collosion Detection - getting the node.

Posted: Fri Apr 20, 2007 1:34 pm
by Strong99
when using the getCollisionPoint() it returns the triangle and outpos but how to get the node from collosion?

Posted: Fri Apr 20, 2007 2:29 pm
by spopo
Well if i understood your question well, then try getSceneNodeFromCameraBB, getSceneNodeFromRayBB or getSceneNodeFromScreenCoordinatesBB.

And shame on you if this is what you're asking! How can you be a project leader if you can't just check what other methods does scene collision manager has...

Posted: Fri Apr 20, 2007 2:39 pm
by Strong99
well... i forgot to say fast, getSceneNodeFromRayBB is the one i was thnking of but its a littlebit time consumming. And those use the bounding boxes not the triangles

Posted: Fri Apr 20, 2007 5:34 pm
by garrittg
getCollisionPoint() works off an ITriangleSelector. to know the node you will need to keep track of where you use the ITrangleSelector. you can also use ISceneNode.getTriangleSelector() to get the current triangle selector set to a node. keep in mind that the same triangle selector can be used on multiple nodes.