German Larrain avatar German Larrain committed a9cf428

VehicleWithArm: keyboard arrows' actions are executed with repeat = True. Thus WHEEL_TORQUE is a small fraction of what it was

Comments (0)

Files changed (1)

bin/VehicleWithArm.py

 	BACKGROUND_COLOR = (0.8,0.8,0.8)
 	FLOOR_BOX_SIZE = (20,0.01,20)
 	
-	WHEEL_TORQUE = 400
+	WHEEL_TORQUE = 3
 	VEHICLE_OFFSET = (2,0.35,4)
 	
 	BALL_PARAMS = ((0.3,(1,0,0)),{'density':1}) # ((radius, center), density)
 		self._frictionless_arm = frictionless_arm
 		
 		Program.__init__(self)
-		self.key_press_functions.add('up', self.go_forwards)
-		self.key_press_functions.add('down', self.go_backwards)
-		self.key_press_functions.add('left', self.turn_left)
-		self.key_press_functions.add('right', self.turn_right)
+		self.key_press_functions.add('up', self.go_forwards, repeat=True)
+		self.key_press_functions.add('down', self.go_backwards, repeat=True)
+		self.key_press_functions.add('left', self.turn_left, repeat=True)
+		self.key_press_functions.add('right', self.turn_right, repeat=True)
 		
 		self.key_press_functions.add('a', self.rotate_clockwise)
 		self.key_press_functions.add('z', self.rotate_counterlockwise)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.