Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. void UOpenDoor::Open_Door()
  2. {
  3. // Find the owning actor:
  4. AActor* Owner = GetOwner();
  5.  
  6. // Create a rotator:
  7. FString oldAngle = "old angle = " + Owner->GetActorRotation().Roll.ToString();
  8. UE_LOG(LogTemp, Warning, TEXT(oldAngle));
  9. FRotator NewRotation = FRotator(0.0f, Owner->GetActorRotation().Roll + OpenAngle, 0.0f);
  10.  
  11. // Set the door rotation:
  12. Owner->SetActorRotation(NewRotation);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement