added default hero zoom

This commit is contained in:
Manish 2019-02-01 12:38:21 +01:00
parent 35adce94a2
commit f5d9e4bd39
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,7 @@ MODULE_RENDER = 'RENDER'
MIN_WHEEL = 0.1
MAX_WHEEL = 6.0
HERO_DEFAULT_ZOOM = 3.0
# ==============================================================================
# -- TransformHelper -----------------------------------------------------------
# ==============================================================================
@ -780,6 +781,7 @@ class ModuleWorld(object):
hero_vehicles = [
actor for actor in self.actors if 'vehicle' in actor.type_id and actor.attributes['role_name'] == 'hero']
if len(hero_vehicles) > 0:
self.module_input.wheel_offset = HERO_DEFAULT_ZOOM
self.hero_actor = random.choice(hero_vehicles)
else:
print("There are no hero vehicles spawned")