NxController Force/Push issue

Couple quick notes about my setup:

SDK: 2.8.4.6 (it’s the latest version currently hooked up to the engine I use)
Engine: Panda3d
Language: Python (wrapper for the c++ calls)

Ok that being said I seem to be having an issue with my NxController not applying any forces to the other objects in the world when I run into them, and they all seem to be fine when they bounce off each other. I make all their DominanceGroups set to 15 by default, and the controller to 0. All the other objects are having their mass set to 10. I’m using NxController::move to do my actual movement but I’ve also tried just applying forces and that doesn’t seem to affect it either. Any ideas what I might have setup wrong that would be causing it to not have the ‘push’ effect I’m looking for?

I don’t have time to write an elaborate reply, but to put it simple, you have to handle how the objects should react to the collision through a callback system for the controllers. You can give the objects force, ignore them, and give the other reactions through this system.

I am pretty sure the PhysX example of the controller for 2.8.4 uses this callback system and interacts differently with different shapes. I would urge you to look through the example code.

Good luck!

class ControllerHitReport : public NxUserControllerHitReport
{
public:
virtual NxControllerAction onShapeHit(const NxControllerShapeHit& hit)
{
// renderTerrainTriangle(hit.faceID);

	if(1 && hit.shape)
	{
		NxCollisionGroup group = hit.shape->getGroup();
		if(group!=GROUP_COLLIDABLE_NON_PUSHABLE)
		{
			NxActor& actor = hit.shape->getActor();
			if(actor.isDynamic())
			{
				if ((gPts[gNbPts].x != hit.worldPos.x) || (gPts[gNbPts].y != hit.worldPos.y) || (gPts[gNbPts].z != hit.worldPos.z))
				{
					gPts[gNbPts++].x = hit.worldPos.x;
					gPts[gNbPts++].y = hit.worldPos.y;
					gPts[gNbPts++].z = hit.worldPos.z;
					if (gNbPts==MAX_NB_PTS)  gNbPts = 0;
				}

				// We only allow horizontal pushes. Vertical pushes when we stand on dynamic objects creates
				// useless stress on the solver. It would be possible to enable/disable vertical pushes on
				// particular objects, if the gameplay requires it.
				if(hit.dir.y==0.0f)
				{
					NxF32 coeff = actor.getMass() * hit.length * 10.0f;
					actor.[b][u]addForceAtLocalPos[/u][/b](hit.dir*coeff, NxVec3(0,0,0), NX_IMPULSE);
					//						actor.addForceAtPos(hit.dir*coeff, hit.controller->getPosition(), NX_IMPULSE);
					//						actor.addForceAtPos(hit.dir*coeff, hit.worldPos, NX_IMPULSE);
				}
			}
		}
	}

	return NX_ACTION_NONE;
}

virtual NxControllerAction  onControllerHit(const NxControllersHit& hit)
{
	return NX_ACTION_NONE;
}

} gControllerHitReport;