ControllerManager Constructor

Jo0oker

24-11-2010 22:03:51

Hello,

I have a new Problem with PhysX, can some one tell me, how to call the constructor for the ControllerManager?

this is is C++/CLI code:

ControllerManager::ControllerManager(Physics^):
BaseType( NxCreateControllerManager( Physics::userAllocator ) )
{
controllerList = gcnew ControllerCollection( this );
}


When i tried it on this way:

ControllerManager c = new ControllerManager()


Visual Studio says, that there is no constructor for ControllerManager.

Greats,
Jo0oker

smiley80

24-11-2010 22:27:01

That constructor is only internal. You have to use the ControllerManager property from your Physics instance:

var physics = Physics.Create();
var controllerManager = physics.ControllerManager;

Jo0oker

25-11-2010 15:54:29

Thank you, it works.