CARLA
 
载入中...
搜索中...
未找到
BaseCarlaMovementComponent.h
浏览该文件的文档.
1// Copyright (c) 2021 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3// Copyright (c) 2019 Intel Corporation
4//
5// This work is licensed under the terms of the MIT license.
6// For a copy, see <https://opensource.org/licenses/MIT>.
7
8#pragma once
9
10#include "GameFramework/MovementComponent.h"
12#include "BaseCarlaMovementComponent.generated.h"
13
15
16UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
18{
19 GENERATED_BODY()
20
21protected:
22
23 UPROPERTY()
24 ACarlaWheeledVehicle* CarlaVehicle;
25
26public:
27
28 virtual void BeginPlay() override;
29
30 virtual void ProcessControl(FVehicleControl &Control);
31
32 virtual FVector GetVelocity() const;
33
34 virtual int32 GetVehicleCurrentGear() const;
35
36 virtual float GetVehicleForwardSpeed() const;
37
38 virtual void DisableSpecialPhysics() {};
39
40protected:
41
42 void DisableUE4VehiclePhysics();
43
44 void EnableUE4VehiclePhysics(bool bResetVelocity = true);
45};
Base class for CARLA wheeled vehicles.
virtual void BeginPlay() override
int32 GetVehicleCurrentGear() const
Active gear of the vehicle.
float GetVehicleForwardSpeed() const
Forward speed in cm/s. Might be negative if goes backwards.
virtual FVector GetVelocity() const override