Skip to content

Commit

Permalink
increase keyboard steering to 0.5, CarControls contructor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Mar 22, 2018
1 parent ca54e27 commit b484227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PythonClient/AirSimClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class CarControls(MsgpackMixin):
manual_gear = 0
gear_immediate = True

def __init__(self, throttle = np.float32(0), steering = np.float32(0), brake = np.float32(0),
def __init__(self, throttle = 0, steering = 0, brake = 0,
handbrake = False, is_manual_gear = False, manual_gear = 0, gear_immediate = True):
self.throttle = throttle
self.steering = steering
Expand Down
4 changes: 2 additions & 2 deletions Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ void ACarPawn::setupInputBindings()
UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveForward", EKeys::Down, -1), this,
this, &ACarPawn::MoveForward);

UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Right, 0.1), this,
UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Right, 0.5), this,
this, &ACarPawn::MoveRight);

UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Left, -0.1), this,
UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Left, -0.5), this,
this, &ACarPawn::MoveRight);

UAirBlueprintLib::BindActionToKey("Handbrake", EKeys::End, this, &ACarPawn::OnHandbrakePressed, true);
Expand Down

0 comments on commit b484227

Please sign in to comment.