Change default pedestrian speed (#1924)
* Change default pedestrian speed * Changing a comment
This commit is contained in:
parent
b45f7c5f95
commit
c5465c250f
|
@ -364,7 +364,7 @@ class KeyboardControl(object):
|
||||||
self._control.speed = .01
|
self._control.speed = .01
|
||||||
self._rotation.yaw += 0.08 * milliseconds
|
self._rotation.yaw += 0.08 * milliseconds
|
||||||
if keys[K_UP] or keys[K_w]:
|
if keys[K_UP] or keys[K_w]:
|
||||||
self._control.speed = 3.333 if pygame.key.get_mods() & KMOD_SHIFT else 2.778
|
self._control.speed = 3.333 if pygame.key.get_mods() & KMOD_SHIFT else 1.389
|
||||||
self._control.jump = keys[K_SPACE]
|
self._control.jump = keys[K_SPACE]
|
||||||
self._rotation.yaw = round(self._rotation.yaw, 1)
|
self._rotation.yaw = round(self._rotation.yaw, 1)
|
||||||
self._control.direction = self._rotation.get_forward_vector()
|
self._control.direction = self._rotation.get_forward_vector()
|
||||||
|
|
|
@ -178,7 +178,7 @@ def main():
|
||||||
# set walk to random point
|
# set walk to random point
|
||||||
all_actors[i].go_to_location(world.get_random_location_from_navigation())
|
all_actors[i].go_to_location(world.get_random_location_from_navigation())
|
||||||
# random max speed
|
# random max speed
|
||||||
all_actors[i].set_max_speed(1 + random.random()) # max speed between 1 and 2 (default is 1.4 m/s)
|
all_actors[i].set_max_speed(1 + random.random()/2) # max speed between 1 and 1.5 (default is 1.4 m/s)
|
||||||
|
|
||||||
print('spawned %d vehicles and %d walkers, press Ctrl+C to exit.' % (len(vehicles_list), len(walkers_list)))
|
print('spawned %d vehicles and %d walkers, press Ctrl+C to exit.' % (len(vehicles_list), len(walkers_list)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue