@@ -171,11 +171,15 @@ public float SidewaySlipMultipler
171
171
// -MaxSteerAngleInput <= SteerAngleInput <= MaxSteerAngleInput.
172
172
[ Range ( 0.01f , 80 ) ]
173
173
public float MaxSteerAngleInput = 25f ;
174
+ [ SerializeField , Min ( 0.0f ) , Tooltip ( "Set 0 to disable the lag" ) ]
175
+ private float steerAngleTimeConstant = 0.0f ;
174
176
175
177
// Set value to clamp AccelerationInput (m/s^2).
176
178
// -MaxAccelerationInput <= AccelerationInput <= MaxAccelerationInput.
177
179
[ Range ( 0.01f , 50 ) ]
178
180
public float MaxAccelerationInput = 10 ;
181
+ [ SerializeField , Min ( 0.0f ) , Tooltip ( "Set 0 to disable the lag" ) ]
182
+ private float accelerationTimeConstant = 0.0f ;
179
183
180
184
[ Header ( "Inputs" ) ]
181
185
@@ -195,8 +199,6 @@ public float AccelerationInput
195
199
set => acceleration . DesiredValue = Mathf . Clamp ( value , - MaxAccelerationInput , MaxAccelerationInput ) ;
196
200
}
197
201
private FirstOrderLaggedFloat acceleration ;
198
- [ SerializeField , Min ( 0.0f ) , Tooltip ( "Set 0 to disable the lag" ) ]
199
- private float accelerationTimeConstant = 0.0f ;
200
202
201
203
/// <summary>
202
204
/// Vehicle steering input. Tire angle (degree)
@@ -208,8 +210,6 @@ public float SteerAngleInput
208
210
set => steerAngle . DesiredValue = Mathf . Clamp ( value , - MaxSteerAngleInput , MaxSteerAngleInput ) ;
209
211
}
210
212
private FirstOrderLaggedFloat steerAngle ;
211
- [ SerializeField , Min ( 0.0f ) , Tooltip ( "Set 0 to disable the lag" ) ]
212
- private float steerAngleTimeConstant = 0.0f ;
213
213
214
214
/// <summary>
215
215
/// Vehicle turn signal input. NONE, LEFT, RIGHT, HAZARD.
0 commit comments