Asked are outdated. I worked it out with these problems.
But there was another problem. When I want to move the parent object, its sub objects copy to a new location and I have one parent and a few the same sub object in different positions. How do I move the parent, so that the children remained in the same relationship?
I create sub object in this way:
Code:
void CBaseObjClass::create(Game::ObjParams &obj)
{
for(UInt i=0; i<obj.sub_objs.elms(); ++i)
{
Edit::World.objCreate(obj.matrixFinal().pos, &obj.sub_objs[i]);
}
}
The second question. Why is not it possible to get an array of objects selected?
At this point, a way to determine which object is selected, it is very brutal.
Code:
for(int i=0; i<Edit::World.objs(); ++i)
{
if(Edit::World.obj(i).selected() == true)
{
// actions
}
}
Calling the code for every object in every frame is very inefficient. Or maybe there is another way?