   PhysX Contact Report Problem
  Hi,I have a simple Physx Scene, where I have a Level with Geometry and some Spheres, that are shot against the Level Geometry. Every time a Sphere hits the wall, the following function is called.void PhysicsContactReport::onContactNotify(NxContactPair &pair, NxU32 events){   NxContactStreamIterator i(pair.stream);NxVec3 P, N;    while(i.goNextPair()) {   while(i.goNextPatch()) {  while(i.goNextPoint()) { P = i.getPoint(); N = i.getPatchNormal();  }   }    }   std::string actorname(pair.actors[0]-&gt;getName());    if(actorname.compare("Level") == 0) {    ((Level*) pair.actors[0]-&gt;userData)-&gt;createDecal(P, N, NxVec3(1, 0, 0));    ((Ball*) pair.actors[1]-&gt;userData)-&gt;setTTL(0.0f);} else {((Level*) pair.actors[1]-&gt;userData)-&gt;createDecal(P, N, NxVec3(1, 0, 0));    ((Ball*) pair.actors[0]-&gt;userData)-&gt;setTTL(0.0f);    }}The code gets the Collision Point, and Normal and then figures out which Actor is the Level and which the Sphere (Ball class). It creates a decal at the point in the level which works just fine with the PhysX part. I also want to set the Balls Time To Live (TTL) to 0. Which is also called (I tested this with a fprintf to console)void Ball::setTTL(float p_time) {  this-&gt;ttl = p_time;}bool Ball::isAlive() {    if(this-&gt;ttl &lt;= 0.0f)   return false;    else   return true;}Every frame I test for each ball if it is alive. This works fine for the normal 5 seconds, the balls are alive. The call from the onNotify function has somehow no effect on this lifetime.What is the problem with my code? Is it a misunderstanding of the PhysX functionality or did I just mess something up in my implementation?ThanksMarkus   
  im a bit confused on what your problem is, but did you make sure that you are setting your new contactNotify object in the collision part of the PhysX API....once you create a new contactNotify, i think there is somewhere you have to give it to PhysX.Another thing, if an actor is put to sleep, contact reports wont be reported (i think for default settings, not sure if that can be changed).   ;  The onContactNotify() function is called correctly. This is no problem.A pointer to two Actors Ball and Level (this are the names of the classes where the PhysX Actors are created) are in the userData variable of the NxActor.In the case of the Level class, there is no problem. I call createDecal() and the Decal is created in the Level object.In the case of the Ball class, I call setTTL() and this function is also called. But the problem is it has no effect on the Ball object. It behaves as the function was never called and the TTL-Value is never set to zero.I think this may be a problem with PhysX and the userData variable, but I just don't know.   