void CRaycastTankExample::createTank(const stringw file, const stringw collFile, const vector3df &pos, const f32 mass)
{
    IAnimatedMeshSceneNode *Node = device->getSceneManager()->addAnimatedMeshSceneNode(
        device->getSceneManager()->getMesh(file.c_str()));
	Node->setPosition(pos);
	//Node->setRotation(vector3df(-40,90,0));
	Node->setMaterialFlag(video::EMF_LIGHTING, true);
	//Node->setScale(vector3df(2,2,4));



	IGImpactMeshShape *shape = new IGImpactMeshShape(Node, device->getSceneManager()->getMesh(collFile.c_str()), mass);


	tank = world->addRigidBody(shape);

    // When using a raycast vehicle, we don't want this rigid body to deactivate.
	tank->setActivationState(EAS_DISABLE_DEACTIVATION);

    // Set some damping on the rigid body because the raycast vehicles tend to bounce a lot without a lot of tweaking.
    // (cheap fix for the example only)
	tank->setDamping(0.4, 0.4);

    // We create our vehicle, passing our newly created rigid body as a parameter.
	vehicle = world->addRaycastVehicle(tank);


    // Set up our wheel construction info. These values can be changed for each wheel,
    // and the values that you want to keep will stay the same, that way
    // all parameters for each wheel can stay the same for what needs to remain equal,
    // such as directions and suspension rest length.
    SWheelInfoConstructionInfo wheel;
    wheel.chassisConnectionPointCS = vector3df(0.0,-0.88,4.0);
    wheel.wheelDirectionCS = vector3df(0.0,-0.1,0.0);
    wheel.wheelAxleCS = vector3df(-0.5,0.0,0.0);
    wheel.suspensionRestLength = 0.6;
    wheel.wheelRadius = 8.0;
    wheel.isFrontWheel = true;

    // The bones are in the center of the mesh on the X axis, so we just set the width ourselves.
    // Do the left row of wheels.
    for(u32 i=0; i < Node->getJointCount(); i++)
    {
        // The bones that we need in this mesh are all named "RoadWheels" with a numerical suffix.
        // So we do a quick check to make sure that no unwanted bones get through as wheels.
        if(Node->getJointNode(i)->getName()[0] == 'R')
        {
            wheel.chassisConnectionPointCS = vector3df(-4, Node->getJointNode(i)->getPosition().Y,Node->getJointNode(i)->getPosition().Z);
            vehicle->addWheel(wheel);
        }
    }

    wheel.wheelAxleCS = vector3df(0.5,0.0,0.0);

    // Do the right row of wheels.
    for(u32 i=0; i < Node->getJointCount(); i++)
    {
        if(Node->getJointNode(i)->getName()[0] == 'R')
        {
            wheel.chassisConnectionPointCS = vector3df(4, Node->getJointNode(i)->getPosition().Y,Node->getJointNode(i)->getPosition().Z);
            vehicle->addWheel(wheel);
        }
    }


	for (u32 i=0;i<vehicle->getNumWheels();i++)
    {
        SWheelInfo &info = vehicle->getWheelInfo(i);

        info.suspensionStiffness = 0.08f;
        info.wheelDampingRelaxation = 20.0f;
        info.wheelDampingCompression = 20.0f;
        info.frictionSlip = 1000;
        info.rollInfluence = 0.1f;


        // We call updateWheel, which takes SWheelInfo as the first parameter,
        // and the ID of the wheel to apply that info to. This must
        // be called after any changes in order for the changes to actually take effect.
        vehicle->updateWheelInfo(i);
    }
}