Hey guys! I'm sorry if you've answered this question before, but I couldn't find anything of the likes on the forum. =)
My problem is the following:
The class "ISceneCollisionManager" gives me functions to return an ISceneNode that something has collided with (examples "getSceneNodeFromCameraBB" "getSceneNodeFromRayBB" ..etc).
Now if, say, I wanted to check the collision with a certain box, that then causes the game to display "Yay, you hit the box", what would be the best approach?
Let the game react to the ISceneNode's name I gave it when I created it?
Create my own Scene node, that also has a method like... "void drawText(string bla)"?
Would you change your advice if this was on a larger scale...like a wall of thousands of boxes that each say something different?
Thank you very much in advance! =)
LunarEffect
Collision Detection and Game Logic
When it collides, have a function that says something like this:
stringw str = "";
str += node->getName(); // After you set the name of the sceneNode!
cout << "You have collided with: " << str.c_str() << endl;
Something similar to do. Also, when it does that, do something such as device->sleep(40); to pause the game.
Hope that helps at all. If you need anything else, just tell.
stringw str = "";
str += node->getName(); // After you set the name of the sceneNode!
cout << "You have collided with: " << str.c_str() << endl;
Something similar to do. Also, when it does that, do something such as device->sleep(40); to pause the game.
Hope that helps at all. If you need anything else, just tell.
