I'm trying to generate the scene node names through the Lua then get the node handles from the Horde, something similar to this :
Code:
function Init ()
scene = {}
for i=1, 12 do
scene[i]={}
scene[i].handle=findNodeHandle(envRoot, 2, "item" .. i)
end
end
Where findNodeHandle is :
Code:
int findNodeHandle (lua_State *L)
{
int StartNode=luaL_checkint(L, 1);
int SceneNodeType=luaL_checkint(L, 2);
const char *NodeName=luaL_checkstring(L, 3);
if (Horde3D::findNodes(StartNode, NodeName, SceneNodeType) == 1)
lua_pushinteger(L, Horde3D::getNodeFindResult(0));
else Error("unable to find the node");
return 1;
}
This piece of code works correctly and I'm happy with that, but when I'm trying to pick the scene items and send their node handles to the Lua, node handle returned from the Horde3DUtils::pickNode differs with the ones that they were found using findNodeHandle.
For ex: If the node handle returned from findNodeHandle is 68, node handle returned from the Horde3DUtils::pickNode is 69. And here is the relation of the node handles :
Code:
new node handles = old node handles + 1
Perhaps this is a bug or something similar.