hey, i'm trying to make a basic script that continually increase/decrease the variable Yaw while it's corresponding key is held down, and then slowly levels out to 0 when both keys are released.
function Update () {
if(yaw > 0){
yaw = yaw-0.5;
} if(yaw < 0){ yaw = yaw+0.5; }
if(Input.GetAxis("Yaw") == 1){
yaw++;
} else if(Input.GetAxis("Yaw") == -1){ yaw--; } else{
}
}
this is all i've got so far, but instead of giving an increase, it only sets yaw at 1, 0, or -1. Also, the response time has plummeted, but all other scripts run at the right speed.
thanks in advance
Can you mark this as answered
– kilgore