majc
09-03-2011 22:39:32
How can i delete a PlayerController?
I tried this:
and i tried this:
In the second one i got a memory error when the newton world made an update, the first one i got an heap memory error after some collisions.
Thanks in advance!
I tried this:
mNonPlayerController->getBody0()->removeNodeUpdateNotify();
mNonPlayerController->getBody0()->removeForceAndTorqueCallback();
mNonPlayerController->getBody0()->removeDestructorCallback();
delete mNonPlayerController->getBody0();
and i tried this:
if(mNonPlayerController)
delete mNonPlayerController;
In the second one i got a memory error when the newton world made an update, the first one i got an heap memory error after some collisions.
Thanks in advance!