if i write customscenenode ,i want to know how to detect which
customscenenode is on ( or click ) , how can i know?
How to check mouse?
I'm toying with this one myself. You can do:
However, if you want to know if it was a certain group of nodes ( such as a bunch of custom scene nodes ) then just entering ICustomSceneNode ( or whatever you called it ) instead of a pointer to a specific node won't work. What you want to do is to create a dummy scene node ( IDummyTransformationSceneNode I think ) that is the parent of this group of nodes.
The problem is you need to get the parent from the node and there isn't any getParent() function for scene nodes. You could add it to your node, just have it return the protected parent pointer from your constructor.
Code: Select all
scene::ISceneNode* node1;
scene::ISceneNode* node2;
// Do some collision from screen coords ( check API for collision manager )
if (node1)
{
// Node 1 was selected
}
if (node2)
{
// Node 2 was selected
}The problem is you need to get the parent from the node and there isn't any getParent() function for scene nodes. You could add it to your node, just have it return the protected parent pointer from your constructor.