Why does EntityInformer:createSingleStaticBox use local pos?

Happy-Howard

17-04-2008 08:32:52

When using EntityInformer to create a BoxGeometry the position of the geom is set using the associated nodes local position. This only works if the nodes local position equals it's global. Is there a good reason the code is written this way instead of using


_node->getWorldPosition();
_node->getWorldOrientation();


The code currently looks like this:


BoxGeometry* EntityInformer::createSingleStaticBox(World *world, Space* space)
{
BoxGeometry* geom = new BoxGeometry(getSize(), world, space);

geom->setPosition(_node->getPosition());
geom->setOrientation(_node->getOrientation());

return geom;
}

rewb0rn

17-04-2008 09:31:05

Good question, maybe its just a mistake..

tuan kuranes

17-04-2008 13:53:03

no good reason. fixed in CVS. (same for sphere, and dynamic counterparts)