diff --git a/PythonAPI/examples/manual_control.py b/PythonAPI/examples/manual_control.py index ef839a4d3..9469bd406 100755 --- a/PythonAPI/examples/manual_control.py +++ b/PythonAPI/examples/manual_control.py @@ -423,7 +423,10 @@ class KeyboardControl(object): world.constant_velocity_enabled = True world.hud.notification("Enabled Constant Velocity Mode at 60 km/h") elif event.key > K_0 and event.key <= K_9: - world.camera_manager.set_sensor(event.key - 1 - K_0) + index_ctrl = 0 + if pygame.key.get_mods() & KMOD_CTRL: + index_ctrl = 9 + world.camera_manager.set_sensor(event.key - 1 - K_0 + index_ctrl) elif event.key == K_r and not (pygame.key.get_mods() & KMOD_CTRL): world.camera_manager.toggle_recording() elif event.key == K_r and (pygame.key.get_mods() & KMOD_CTRL): diff --git a/Unreal/CarlaUE4/.ignore b/Unreal/CarlaUE4/.ignore new file mode 100644 index 000000000..1aab3d826 --- /dev/null +++ b/Unreal/CarlaUE4/.ignore @@ -0,0 +1,9 @@ +.kdev4 +.vscode +Content +Intermediate +Saved +Plugins/Carla/CarlaDependencies +Plugins/Carla/Content +Plugins/Carla/Intermediate +Plugins/CarlaExporter/Intermediate diff --git a/Unreal/CarlaUE4/Config/OptionalModules.ini b/Unreal/CarlaUE4/Config/OptionalModules.ini new file mode 100644 index 000000000..c90167603 --- /dev/null +++ b/Unreal/CarlaUE4/Config/OptionalModules.ini @@ -0,0 +1 @@ +Chrono OFF CarSim OFF diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp index 19bf220bb..0876264f3 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp @@ -100,7 +100,14 @@ static void WriteFloatPixelsToBuffer_Vulkan( FIntRect(0, 0, Rect.X, Rect.Y), gFloatPixels, FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX)); - Buffer.copy_from(Offset, gFloatPixels); + + TArray IntermediateBuffer; + IntermediateBuffer.Reserve(gFloatPixels.Num() * 2); + for (FFloat16Color& color : gFloatPixels) { + IntermediateBuffer.Add((color.R.GetFloat() - 32767) * (2.0 / 65535)); + IntermediateBuffer.Add((32767 - color.G.GetFloat()) * (2.0 / 65535)); + } + Buffer.copy_from(Offset, IntermediateBuffer); } // =============================================================================