Skip to content

Commit

Permalink
[ATurtlebotBurger::InitializeMoveComponent()]
Browse files Browse the repository at this point in the history
Call Super::, which initializes RobotVehicleMoveComponent
[ATurtlebotBurger] definition: cleaning up
  • Loading branch information
duc committed Dec 13, 2021
1 parent d1bc7c8 commit 3c354ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ATurtlebotBurger::ATurtlebotBurger(const FObjectInitializer& ObjectInitializer)

void ATurtlebotBurger::InitializeMoveComponent()
{
Super::InitializeMoveComponent();
DifferentialDriveComponent = NewObject<UDifferentialDriveComponent>(this, TEXT("DifferentialDriveComponent"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,53 +30,51 @@ class RAPYUTASIMULATIONPLUGINS_API ATurtlebotBurger : public ARobotVehicle

virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

public:
// Called every frame
virtual void Tick(float DeltaTime) override;

UFUNCTION(BlueprintCallable)
virtual void Init();

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UStaticMeshComponent* Base;
UStaticMeshComponent* Base = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UStaticMeshComponent* LidarSensor;
UStaticMeshComponent* LidarSensor = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UStaticMeshComponent* WheelLeft;
UStaticMeshComponent* WheelLeft = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UStaticMeshComponent* WheelRight;
UStaticMeshComponent* WheelRight = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UStaticMeshComponent* CasterBack;
UStaticMeshComponent* CasterBack = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPhysicsConstraintComponent* Base_LidarSensor;
UPhysicsConstraintComponent* Base_LidarSensor = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPhysicsConstraintComponent* Base_WheelLeft;
UPhysicsConstraintComponent* Base_WheelLeft = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPhysicsConstraintComponent* Base_WheelRight;
UPhysicsConstraintComponent* Base_WheelRight = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPhysicsConstraintComponent* Base_CasterBack;
UPhysicsConstraintComponent* Base_CasterBack = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MaxForce = 1000;
float MaxForce = 1000.f;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UMaterial* VehicleMaterial;
UMaterial* VehicleMaterial = nullptr;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UMaterial* BallMaterial;
UMaterial* BallMaterial = nullptr;

UPROPERTY(VisibleAnywhere)
bool IsInitialized = false;

protected:
UFUNCTION()
void SetupConstraintsAndPhysics();

Expand Down

0 comments on commit 3c354ab

Please sign in to comment.