Bounding Box and Selection.
Posted: Sat May 20, 2006 10:41 am
Hello,
I have this problem with picking scene nodes
Sceen Shot : http://www.megalomania666.com/xjobb/bound.JPG
As seen on the screen shot I can only select the wall at the upper part of it.
I have been looking around for quite some time in the forum or an answer to this now. I suspect it´s a bounding box problem and I have changed aabbox3d.h, line 136 to :
with no result.
I have tried both
and
And they both find the wall at it´s upper part.
Is my only hope the irr::scene::IMetaTriangleSelector* now?
I have this problem with picking scene nodes
Sceen Shot : http://www.megalomania666.com/xjobb/bound.JPG
As seen on the screen shot I can only select the wall at the upper part of it.
I have been looking around for quite some time in the forum or an answer to this now. I suspect it´s a bounding box problem and I have changed aabbox3d.h, line 136 to :
Code: Select all
const vector3d<T> e = getExtent() * (T)0.5;
I have tried both
Code: Select all
smgr->getSceneCollisionManager()->getSceneNodeFromCameraBB(camera);
Code: Select all
core::dimension2d<s32> pos;
pos.Width = device->getCursorControl()->getPosition().X;
pos.Height = device->getCursorControl()->getPosition().Y;
selectedMesh = smgr->getSceneCollisionManager()->getSceneNodeFromScreenCoordinatesBB(
core::position2d<s32>(pos.Width,pos.Height),0);
Is my only hope the irr::scene::IMetaTriangleSelector* now?