Closed asifsid-32 closed 3 years ago
you could add a custom check on the ego vehicle's speed when it's reading the forward key. if the speed exceeds the threshold, maybe you could simply ignore the forward key.
you could add a custom check on the ego vehicle's speed when it's reading the forward key. if the speed exceeds the threshold, maybe you could simply ignore the forward key.
@ntutangyun in which file we are supposed to make changes ?? Can you please help me with the source code ?
hi @asifsid-32 maybe this is what you want:
if (VehicleController != null)
{
SteerInput = VehicleController.SteerInput;
AccellInput = VehicleController.AccelInput;
}
if (RB.velocity.magnitude > 5f)
{
AccelInput = 0f;
}
hi @asifsid-32 maybe this is what you want:
if (VehicleController != null) { SteerInput = VehicleController.SteerInput; AccellInput = VehicleController.AccelInput; } if (RB.velocity.magnitude > 5f) { AccelInput = 0f; }
Thanks !!
@asifsid-32 if you want to always drive at a constant speed you can add the cruise control sensor.
Hello LGSVL Team,
I want to control speed of ego vehicle such that when i am using the keyboard as input it shouldn't cross a specified maximum speed. Even though i am pressing the forward key it should follow the specified speed. Is there anyway to do it without using pythonAPI ?