Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by e3dalive » Thu Dec 03, 2015 6:23 am
I didn't find any remove/delete function from character manager or character itself, is it possible to delete him from newton simulation and delete memory that character allocated without deleting the manager? I'm using newton svn with shapecast vehicle, prior to new svn with vehicle.
-
e3dalive
-
- Posts: 87
- Joined: Thu Feb 05, 2015 5:20 am
by e3dalive » Thu Dec 17, 2015 3:41 am
apparently you need to do this playerManager->DestroyController(m_controller); and purely deleting manager doesn't work, you can delete this topic
-
e3dalive
-
- Posts: 87
- Joined: Thu Feb 05, 2015 5:20 am
by Sweenie » Thu Dec 17, 2015 4:44 am
Thats what I do for the VehicleManager as well.
I create the VehicleManager(new) and then create the VehicleController by calling manager->CreateVehicle
Then I destroy the vehicle using Manager->DestroyController(vehicle) and finally delete the Manager.
Noticed though that destroying the VehicleController doesn't destroy the bodies created by the VehicleController so before I destroy the controller I must manually destroy the chassi body, all created tires and the engine body. The joints should be destroyed automatically when the vehicle bodies are destroyed. Not a big thing though as the vehicle provides a GetBody function and an iterator to fetch the tire bodies as well.
-
Sweenie
-
- Posts: 498
- Joined: Mon Jan 24, 2005 7:59 am
- Location: Sweden
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 2 guests