When people spawn, they seem to crash, but usually only when I have a custom tank spawned.
function CustomtankVehicle::onAdd(%this,%obj)
{
%obj.Shoot = 2;
// Setup the car with some defaults tires & springs
for(%i = 0; %i < %this.numWheels; %i++)
{
%obj.setWheelTire(%i, %this.defaultTire);
%obj.setWheelSpring(%i, %this.defaultSpring);
}
// 4 wheel steering
%obj.setWheelSteering(0,1);
%obj.setWheelSteering(1,1);
%obj.setWheelSteering(2,-0.8);
%obj.setWheelSteering(3,-0.8);
// 4 wheel drive
%obj.setWheelPowered(0,true);
%obj.setWheelPowered(1,true);
%obj.setWheelPowered(2,true);
%obj.setWheelPowered(3,true);
}I think it might be the vehicles, which are just empty, as another vehicle I made using tires seems to have the same problem. Could it be referncing wheels from another zip?
datablock WheeledVehicleTire(CustomtankTire)
{
// Tires act as springs and generate lateral and longitudinal
// forces to move the vehicle. These distortion/spring forces
// are what convert wheel angular velocity into forces that
// act on the rigid body.
shapeFile = "add-ons/vehicle_tank/emptyWheel.dts";
mass = 10;
radius = 1;
staticFriction = 5;
kineticFriction = 5;
restitution = 0.5;
// Spring that generates lateral tire forces
lateralForce = 18000;
lateralDamping = 4000;
lateralRelaxation = 0.01;
// Spring that generates longitudinal tire forces
longitudinalForce = 14000;
longitudinalDamping = 2000;
longitudinalRelaxation = 0.01;
};