makke4ever
25-05-2011 14:59:48
Hi,
I am implementing a reset function for my race game, but this seems not as easy as I thought.
The first way I tried was by calling the setPosition() function of the wheeledRigidBody, but this did not work as it should.
Another way I tried was by deleting the entire vehicle and just creating it back, but when I do this, the program crashes in the stepSimulation() function of OgreBulletCollisions::CollisionsWorld. The exact bullet function that crashes is btDiscreteDynamicsWorld::updateActions(). I have looked at the constructor en destructor of RaycastVehicle, but the destructor does not delete any of the pointers created in the constructor. Could this be the source of my problem?
Can someone please help me?
I am implementing a reset function for my race game, but this seems not as easy as I thought.
The first way I tried was by calling the setPosition() function of the wheeledRigidBody, but this did not work as it should.
Another way I tried was by deleting the entire vehicle and just creating it back, but when I do this, the program crashes in the stepSimulation() function of OgreBulletCollisions::CollisionsWorld. The exact bullet function that crashes is btDiscreteDynamicsWorld::updateActions(). I have looked at the constructor en destructor of RaycastVehicle, but the destructor does not delete any of the pointers created in the constructor. Could this be the source of my problem?
Can someone please help me?