MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / resetCar

Method resetCar

src/Physics/Car.cpp:429–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void Car::resetCar(glm::vec3 reset_position, glm::quat reset_orientation)
430{
431 setPosition(reset_position, reset_orientation);
432 if (m_vehicle)
433 {
434 m_carChassis->clearForces();
435 m_carChassis->setLinearVelocity(btVector3(0,0,0));
436 m_carChassis->setAngularVelocity(btVector3(0,0,0));
437 m_vehicle -> resetSuspension();
438 for (int i = 0; i < m_vehicle->getNumWheels(); i++)
439 {
440 //synchronize the wheels with the (interpolated) chassis worldtransform
441 m_vehicle -> updateWheelTransform(i, true);
442 }
443 }
444}
445
446void Car::writeObj(const std::string &path) {
447 std::cout << "Writing Meshes to " << path << std::endl;

Callers 1

ResetToVroadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected