Optimizations
This commit is contained in:
parent
1334116a98
commit
881e957216
|
@ -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)
|
||||
|
|
|
@ -447,7 +447,7 @@ void UActorBlueprintFunctionLibrary::MakeObstacleDetectorDefinitions(
|
|||
FActorDefinition &Definition)
|
||||
{
|
||||
Definition = MakeGenericSensorDefinition(TEXT("other"), TEXT("obstacle"));
|
||||
|
||||
AddVariationsForSensor(Definition);
|
||||
// Distance.
|
||||
FActorVariation distance;
|
||||
distance.Id = TEXT("distance");
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue