![]() ![]() |
Nov 8 2009, 03:49 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 8-November 09 Member No.: 9,784 |
I'm using PhysX 2.8.1 API under Linux. My scene initializes and I get all the objects I would expect. I have a loop that retrieves actor positions at any point, but none of my actors seem to move. With just a plane and a box floating above it, nothing seems to move. I have set gravity in the sceneDesc and the actors starts with a velocity. Here is the code I use every frame to update and get coords:
int nbActors = pScene->getNbActors(); NxActor** actors = pScene->getActors(); while(nbActors--) { NxActor* actor = *actors++; if(!actor->userData) continue; Entity *e = (Entity *)actor->userData; if(e && !e->props) e = e->parent; if(e && !e->props) e = e->parent; if(!e || !e->props) continue; nProperties::OriginProperty *prop = (nProperties::OriginProperty *)e->props->GetProp(PropertyManager::ORIGIN); if(prop) { cmMatrix m; //actor->getGlobalPose().getColumnMajor44(m.mbuf); NxVec3 nxo = actor->getGlobalPose().t; prop->orig = Vec3(VEC3_3f(nxo)); t2printf("Orig update %s: %f %f %f\n", e->id, VEC3_3f(prop->orig)); } } pScene->simulate(oTimer.renderTimer.totaltime / 1000.0f); pScene->flushStream(); pScene->fetchResults(NX_RIGID_BODY_FINISHED, true); i get the position reported back properly in the actor loop, but it never changes... |
|
|
|
![]() ![]() |
|
Copyright © 2008 NVIDIA® Corporation. Terms of Use | Legal Info | Privacy Policy | Time is now: 23rd November 2009 - 02:28 PM |