|
有没有办法通过更新osg场景来更新physx中的Actor呢,
case osgGA::GUIEventAdapter::FRAME:
PhysXInterface::instance()->simulate( 0.02 );
for ( NodeMap::iterator itr=_physicsNodes.begin();
itr!=_physicsNodes.end(); ++itr )
{
NxActor *actor=NULL;
osg::Matrix matrix = PhysXInterface::instance()->getMatrix(itr->first,actor);
itr->second->setMatrix( matrix );
}
我想把ARRAY老师的那个例子改下,变为osg::Matrix matrix=itr->second->getMatrix( );
PhysXInterface::instance()->setMatrix(itr->first);
但是场景很多box都没了,求助,给个思路也行~谢谢了 |
|