[osg-users] Collided nodes in callback
Matus Gabriska
matus.gabriska at gmail.com
Sat May 21 08:02:29 PDT 2016
Hi,
i will try to be more exact on this pseudocode:
Code:
operator() (osg::Node* current, osg::NodeVisitor* nv)
{
//i want to get list of nodes which are in collision with current node so i can print it, for example
std::vector<osg::Node> collided = nv->someCustomMethod(current);
if(!collided.empty())
{
for(osg::Node &node : collided)
{
std::cout << "collision with node: " + node->getName() << std::endl;
}
}
There is no need to get this nodes from nodevisotor. I dont care how i will get them as long as i use pure osg not bullet. This code is just example.
Thank you!
Cheers,
Matus
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67186#67186
More information about the osg-users
mailing list