I'm trying to make a vehicle with no spring and it has low mass. (Basically like a matchbox car)
This is the block of code with the spring.
datablock WheeledVehicleSpring(RoboSpring)
{
// Wheel suspension properties
length = 0.05; // Suspension travel
force = 6000; //3000; // Spring force
damping = 800; //800; // Spring damping
antiSwayForce = 6; //3; // Lateral anti-sway force
};
Tires:
datablock WheeledVehicleTire(RoboBigTire)
{
// 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 = "./Wheelbig.dts";
mass = 5; //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;
};
datablock WheeledVehicleTire(RoboSmallTire)
{
// 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 = "./Wheelsmall.dts";
mass = 2; //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;
};I needed different wheels on some mounts so I did:
function Robovehicle::onadd(%this,%obj)
{
parent::onadd(%this,%obj);
%obj.setWheelTire(0,RoboBigtire);
%obj.setWheelTire(1,RoboBigtire);
%obj.setWheelTire(2,RoboSmalltire);
%obj.setWheelSpring(0,RoboSpring);
%obj.setWheelSpring(1,RoboSpring);
%obj.setWheelSpring(2,RoboSpring);
%obj.setWheelSteering(0,0);
%obj.setWheelSteering(1,0);
%obj.setWheelSteering(2,-1);
%obj.setWheelPowered(0,true);
%obj.setWheelPowered(1,true);
%obj.setWheelPowered(2,true);
}And when I spawn the vehicle, it has wheels, it bounces all over the place, and I get this console error:setWheelTire: datablock does not exist (or is not a tire)
setWheelSpring: datablock does not exist (or is not a spring)
setWheelTire: datablock does not exist (or is not a tire)
setWheelSpring: datablock does not exist (or is not a spring)
setWheelTire: datablock does not exist (or is not a tire)
setWheelSpring: datablock does not exist (or is not a spring)Can anyone help?