Skip to content

Commit

Permalink
Fixup so it compiles in Unreal 4.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerg Reichardt committed Mar 21, 2018
1 parent 349841c commit e660675
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/Car/SimModeCar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void ASimModeCar::setupVehiclesAndCamera(std::vector<VehiclePtr>& vehicles)
{
//get player controller
APlayerController* player_controller = this->GetWorld()->GetFirstPlayerController();
FTransform actor_transform = player_controller->GetActorTransform();
FTransform actor_transform = player_controller->GetViewTarget()->GetActorTransform();
//put camera little bit above vehicle
FTransform camera_transform(actor_transform.GetLocation() + FVector(follow_distance_, 0, 400));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void ASimModeWorldMultiRotor::setupVehiclesAndCamera(std::vector<VehiclePtr>& ve
{
//get player controller
APlayerController* player_controller = this->GetWorld()->GetFirstPlayerController();
FTransform actor_transform = player_controller->GetActorTransform();
FTransform actor_transform = player_controller->GetViewTarget()->GetActorTransform();
//put camera little bit above vehicle
FTransform camera_transform(actor_transform.GetLocation() + FVector(-300, 0, 200));

Expand Down

0 comments on commit e660675

Please sign in to comment.