Optimizations

This commit is contained in:
Daniel 2019-01-29 20:43:37 +01:00
parent 1334116a98
commit 881e957216
3 changed files with 5 additions and 3 deletions

View File

@ -317,6 +317,8 @@ This sensor, when attached to an actor, reports if there is obstacles ahead.
| `hit_radius` | float | 0.5 | Radius of the trace |
| `only_dynamics` | bool | false | If true, the trace will only look for dynamic objects |
| `debug_linetrace` | bool | false | If true, the trace will be visible |
| `sensor_tick` | float | 0.0 | Seconds between sensor captures (ticks) |
This sensor produces
[`carla.ObstacleDetectionSensorEvent`](python_api.md#carlaobstacledetectionsensoreventdata)

View File

@ -447,7 +447,7 @@ void UActorBlueprintFunctionLibrary::MakeObstacleDetectorDefinitions(
FActorDefinition &Definition)
{
Definition = MakeGenericSensorDefinition(TEXT("other"), TEXT("obstacle"));
AddVariationsForSensor(Definition);
// Distance.
FActorVariation distance;
distance.Id = TEXT("distance");

View File

@ -33,11 +33,11 @@ void AObstacleDetectionSensor::Set(const FActorDescription &Description)
Distance = UActorBlueprintFunctionLibrary::RetrieveActorAttributeToFloat(
"distance",
Description.Variations,
Distance) * 100;
Distance) * 100.0f;
HitRadius = UActorBlueprintFunctionLibrary::RetrieveActorAttributeToFloat(
"hit_radius",
Description.Variations,
HitRadius) * 100;
HitRadius) * 100.0f;
bOnlyDynamics = UActorBlueprintFunctionLibrary::RetrieveActorAttributeToBool(
"only_dynamics",
Description.Variations,