PhysX Active Transform is a bad practice ?

Started by
0 comments, last by NumberXaero 9 years, 1 month ago

Hi,

I use active transform array of PhysX :


SceneDesc.flags |= physx::PxSceneFlag::eENABLE_ACTIVETRANSFORMS;

in the update each frame I get what moved using :


physx::PxU32 ActiveTransformCount;
const physx::PxActiveTransform* ActiveTransformArray = m_Scene->getActiveTransforms( ActiveTransformCount );
But I read on the doc :
There may be a performance penalty for enabling the Active Transform Notification, hence this flag should only be enabled if the application intends to use the feature.

Is it a bad practice and better to update manually each actor using getGlobalPose ?

Advertisement

I wouldnt go as far as saying its a bad practice, after all this is what its for, all they are saying is there may be a performance penalty for enabling it, although I use it myself and have never seen any problem with it.

I suppose you could use getGlobalPose, but active transform returns only those that moved, with getGlobalPose how would you know which objects didnt move? You might be doing more work updating objects that didnt move at all.

This topic is closed to new replies.

Advertisement