I made a setup for ray collision detection:
Code: Select all
ICameraSceneNode* cam = device->getSceneManager()->getActiveCamera();
ISceneCollisionManager* collMan = smgr->getSceneCollisionManager();
core::line3d<f32> ray;
ray.start = cam->getPosition();
ray.end = ray.start + (cam->getTarget() - ray.start).normalize() * 1000.0f;
core::vector3df intersection;
core::triangle3df hitTriangle;
ISceneNode * selectedSceneNode = collMan->getSceneNodeAndCollisionPointFromRay(ray,intersection,hitTriangle,0,0);
Is something special with the SKYBOX? Can I somehow ignore it from the ray collision detection? I tried to ignore its nodeID, but I can only check for the ID or for the NAME only after I pointed to it, so the
Code: Select all
getSceneNodeAndCollisionPointFromRay
I tried to setup a triangle selector for both OCTREE ans SKYBOX, without success...