Fix #322, agents box extent was sent in centimeters
This commit is contained in:
parent
9380c4cc11
commit
74e2c01b5f
|
@ -207,7 +207,7 @@ void FCarlaEncoder::Visit(const UVehicleAgentComponent &Agent)
|
||||||
::Encode(Vehicle.GetVehicleTransform(), Data.transform);
|
::Encode(Vehicle.GetVehicleTransform(), Data.transform);
|
||||||
Data.type = CARLA_SERVER_AGENT_VEHICLE;
|
Data.type = CARLA_SERVER_AGENT_VEHICLE;
|
||||||
Data.forward_speed = Vehicle.GetVehicleForwardSpeed() * TO_METERS;
|
Data.forward_speed = Vehicle.GetVehicleForwardSpeed() * TO_METERS;
|
||||||
::Encode(Vehicle.GetVehicleBoundsExtent(), Data.box_extent);
|
::Encode(Vehicle.GetVehicleBoundsExtent() * TO_METERS, Data.box_extent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FCarlaEncoder::Visit(const UWalkerAgentComponent &Agent)
|
void FCarlaEncoder::Visit(const UWalkerAgentComponent &Agent)
|
||||||
|
@ -215,5 +215,5 @@ void FCarlaEncoder::Visit(const UWalkerAgentComponent &Agent)
|
||||||
::Encode(Agent.GetComponentTransform(), Data.transform);
|
::Encode(Agent.GetComponentTransform(), Data.transform);
|
||||||
Data.type = CARLA_SERVER_AGENT_PEDESTRIAN;
|
Data.type = CARLA_SERVER_AGENT_PEDESTRIAN;
|
||||||
Data.forward_speed = Agent.GetForwardSpeed() * TO_METERS;
|
Data.forward_speed = Agent.GetForwardSpeed() * TO_METERS;
|
||||||
::Encode(Agent.GetBoundingBoxExtent(), Data.box_extent);
|
::Encode(Agent.GetBoundingBoxExtent() * TO_METERS, Data.box_extent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue