The geometry hierarchy seems to be wrong. I can only get some side parts turning, and only on the "yaw001" node.
Here's the fixed script for smooth movement, but somebody has to help you with setting up the hierarchy:
//vehicle script file
//see http://xtrac.outerra.com/index.fcgi/wiki/vehicle for example and documentation
var turret,mantlet;
const MaxTurretXSpeed = 5; //deg/s
const MaxTurretYSpeed = 5; //deg/s
const MaxTurretXAccel = 100;//deg/s^2
const MaxTurretYAccel = 100;//deg/s^2
const MinTurretAngle = -8; //in deg gun depression
const MaxTurretAngle = 90; //in deg gun elevation
const EF = 25000.0; //engine force
const BF = 20000.0; //braking force
const EFr = 0.02; //engine force reduction coef with speed
const maxkmh = 40; //top speed
function radians(v){
return v*Math.PI/180.0;
}
//invoked only the first time the model is loaded, or upon reload
function init_chassis(){
var geom = this.get_geomob(0);
turret = geom.get_joint('yaw001');//geom.get_joint('yaw');
mantlet = geom.get_joint('pitch');
return {mass:11500, com:{z:0.5,y:0.5}, steering:2.0, steering_ecf:60, centering: 100, centering_ecf:20};
}
//invoked for each new instance of the vehicle
function init_vehicle(){
this.set_fps_camera_pos({x:-0.5,y:0.00,z:3.40});
this.snd = this.sound();
this.geom = this.get_geomob(0);
this.turx = new axis_integrator(radians(MaxTurretXSpeed), radians(MaxTurretXAccel));
this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));
}
//invoked when engine starts or stops
//handle extra actions
function action(k,v,dt)
{
switch(k){
case ATurretX: this.turx.set(v); break;
case ATurretY: this.tury.set(v); break;
}
}
const forceloss = 1.0 / (EFr*maxkmh + 1);
//invoked each frame to handle the inputs and animate the model
function update_frame(dt, engine, brake, steering)
{
if(this.turx.changed(dt)) this.geom.rotate_joint_orig(turret, this.turx.value, {z:-1});
if(this.tury.changed(dt)) this.geom.rotate_joint_orig(mantlet, this.tury.value, {x:1});
}