Rain particles and Update.sh fixes (#2814)

* Fixed camera weather changes

* Updated changelog

* Fixed Update.sh when root path contains and space
This commit is contained in:
Marc Garcia Puig 2020-05-05 16:46:41 +02:00 committed by GitHub
parent 0124a47bc9
commit e78ccc6852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 12 deletions

View File

@ -1,6 +1,8 @@
## Latest
* Added API function **add_angular_impulse** to add angular impulse to any actor
* Added API function `add_angular_impulse()` to add angular impulse to any actor
* Fixed rain drop spawn issues when spawning camera sensors
* Fixed Update.sh from failing when the root folder contains a space on it
## CARLA 0.9.9
@ -21,7 +23,7 @@
* API extensions:
- Added new methods to `Map`: `get_all_landmarks`, `get_all_landmarks_from_id` and `get_all_landmarks_of_type`
* Added synchronization of traffic lights in sumo co-simulation
* Added light manager to control the lights of the map.
* Added light manager to control the lights of the map
## CARLA 0.9.8

View File

@ -461,6 +461,10 @@ void ASceneCaptureSensor::BeginPlay()
SceneCaptureSensor_local_ns::ConfigureShowFlags(CaptureComponent2D->ShowFlags,
bEnablePostProcessingEffects);
// This ensures the camera is always spawning the rain drops in case the
// weather was previously set to has rain
GetEpisode().GetWeather()->NotifyWeather();
Super::BeginPlay();
}

View File

@ -35,6 +35,12 @@ void AWeather::ApplyWeather(const FWeatherParameters &InWeather)
RefreshWeather(Weather);
}
void AWeather::NotifyWeather()
{
// Call the blueprint that actually changes the weather.
RefreshWeather(Weather);
}
void AWeather::SetWeather(const FWeatherParameters &InWeather)
{
Weather = InWeather;

View File

@ -21,18 +21,18 @@ public:
AWeather(const FObjectInitializer& ObjectInitializer);
/* Update the weather parameters and notifies it to the blueprint's event
*/
/// Update the weather parameters and notifies it to the blueprint's event
UFUNCTION(BlueprintCallable)
void ApplyWeather(const FWeatherParameters &WeatherParameters);
/* Update the weather parameters without notifing it to the blueprint's event
*/
/// Notifing the weather to the blueprint's event
void NotifyWeather();
/// Update the weather parameters without notifing it to the blueprint's event
UFUNCTION(BlueprintCallable)
void SetWeather(const FWeatherParameters &WeatherParameters);
/* Returns the current WeatherParameters
*/
/// Returns the current WeatherParameters
UFUNCTION(BlueprintCallable)
const FWeatherParameters &GetCurrentWeather() const
{

View File

@ -44,19 +44,19 @@ done
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
CONTENT_FOLDER=$SCRIPT_DIR/Unreal/CarlaUE4/Content/Carla
CONTENT_FOLDER="${SCRIPT_DIR}/Unreal/CarlaUE4/Content/Carla"
CONTENT_ID=$(tac $SCRIPT_DIR/Util/ContentVersions.txt | egrep -m 1 . | rev | cut -d' ' -f1 | rev)
CONTENT_LINK=http://carla-assets.s3.amazonaws.com/${CONTENT_ID}.tar.gz
VERSION_FILE=${CONTENT_FOLDER}/.version
VERSION_FILE="${CONTENT_FOLDER}/.version"
function download_content {
if [[ -d "$CONTENT_FOLDER" ]]; then
echo "Backing up existing Content..."
mv -v "$CONTENT_FOLDER" "${CONTENT_FOLDER}_$(date +%Y%m%d%H%M%S)"
fi
mkdir -p $CONTENT_FOLDER
mkdir -p "$CONTENT_FOLDER"
mkdir -p Content
if hash aria2c 2>/dev/null; then
echo -e "${CONTENT_LINK}\n\tout=Content.tar.gz" > .aria2c.input
@ -67,7 +67,7 @@ function download_content {
fi
tar -xvzf Content.tar.gz -C Content
rm Content.tar.gz
mv Content/* $CONTENT_FOLDER
mv Content/* "$CONTENT_FOLDER"
rm -rf Content
echo "$CONTENT_ID" > "$VERSION_FILE"
echo "Content updated successfully."