I have a car entity that I'm not using template with and I would like it to rotate when moving Forward and Reverse, and not rotate when still, the wheels turn by aturndist_pan. When I first start the level the wheels we go left and right, while car body is still(good thing) but when moving backwards wheels move but car wont rotate(bad thing) ex...
this is the code I have so far

var test_1[3] = 280,-70,0;
var test_2[3] = 280,70,0;

while(1)
{
vec_set(temp.x,test_1.x);
vec_rotate(temp.x,my.pan);//sets the rotate
vec_add(temp.x,my.x);

my.aturndist_pan/= 1.03;
my.aturndist_pan=0;
if(key_q){my.aturndist_pan = 0.25;}//sets the key and direction
//turn up for sharp turns
if(key_e){my.aturndist_pan = -0.25;}//sets the key and direction
my.turndist_pan/= 1.03;
my.turndist_pan = clamp(my.turndist_pan,-2.5,2.5);
if(key_w){my.speed_x += (40-my.speed_x)/80;}
if(key_s){my.speed_x -= (40-my.speed_x)/80;}
if(key_q && my.speed_x > 1 || key_e && my.speed_x > 1 )

{
my.no_rotate = off;

if(key_q && my.speed_x == 0|| key_e && my.speed_x == 0 )

{

my.no_rotate = on;
}
}


wait(1);
//my.no_rotate = on;
}
}
}