From 362d613c6ce0b739aaeb5c8f67d1761092ddbd8e Mon Sep 17 00:00:00 2001 From: nsubiron Date: Tue, 30 Oct 2018 12:52:38 +0100 Subject: [PATCH] Fix camera position in vehicle_gallery.py --- PythonAPI/vehicle_gallery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonAPI/vehicle_gallery.py b/PythonAPI/vehicle_gallery.py index 316133e0b..f05aa4fcf 100755 --- a/PythonAPI/vehicle_gallery.py +++ b/PythonAPI/vehicle_gallery.py @@ -28,7 +28,7 @@ import time def get_transform(vehicle_location, angle, d=6.4): a = math.radians(angle) location = carla.Location(d * math.cos(a), d * math.sin(a), 2.0) + vehicle_location - return carla.Transform(location, carla.Rotation(yaw=180 + angle, pitch=-20)) + return carla.Transform(location, carla.Rotation(yaw=180 + angle, pitch=-15)) def main(): @@ -52,7 +52,7 @@ def main(): while angle < 356: timestamp = world.wait_for_tick() angle += timestamp.delta_seconds * 60.0 - spectator.set_transform(get_transform(location, angle - 90)) + spectator.set_transform(get_transform(vehicle.get_location(), angle - 90)) finally: