Added type to EnvironmentObject

This commit is contained in:
doterop 2020-11-06 14:30:45 +01:00 committed by bernat
parent 6b8c40d60a
commit ab16a64ffb
2 changed files with 16 additions and 2 deletions

View File

@ -31,11 +31,12 @@ namespace rpc {
: transform(EnvironmentObject.Transform), : transform(EnvironmentObject.Transform),
bounding_box(EnvironmentObject.BoundingBox), bounding_box(EnvironmentObject.BoundingBox),
id(EnvironmentObject.Id), id(EnvironmentObject.Id),
name(TCHAR_TO_UTF8(*EnvironmentObject.Name)) {} name(TCHAR_TO_UTF8(*EnvironmentObject.Name)),
type(EnvironmentObject.ObjectLabel) {}
#endif // LIBCARLA_INCLUDED_FROM_UE4 #endif // LIBCARLA_INCLUDED_FROM_UE4
MSGPACK_DEFINE_ARRAY(transform, bounding_box, id, name); MSGPACK_DEFINE_ARRAY(transform, bounding_box, id, name, type);
}; };
} // namespace rpc } // namespace rpc

View File

@ -13,6 +13,17 @@
namespace crp = carla::rpc; namespace crp = carla::rpc;
enum EnvironmentObjectType
{
Invalid,
Vehicle,
Character,
TrafficLight,
ISMComp,
SMComp,
SKMComp
};
// Name is under discussion // Name is under discussion
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct CARLA_API FEnvironmentObject struct CARLA_API FEnvironmentObject
@ -32,6 +43,8 @@ struct CARLA_API FEnvironmentObject
uint64 Id = 0; uint64 Id = 0;
EnvironmentObjectType Type = EnvironmentObjectType::Invalid;
crp::CityObjectLabel ObjectLabel; crp::CityObjectLabel ObjectLabel;
bool CanTick = false; bool CanTick = false;