Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. void APlayerShip::Fire0() {
  2. TArray<FName> sockets = OurVisibleComponent->GetAllSocketNames();
  3. for (size_t i = 0; i < sockets.Num(); i++) {
  4. if (sockets[i].ToString().Contains("Weapon0")) {
  5. const FVector Socket0Loc = OurVisibleComponent->GetSocketLocation(sockets[i]);
  6. const FRotator Socket0Rot = OurVisibleComponent->GetSocketRotation(sockets[i]);
  7. ABullet* bul = APlayerShip::SpawnBP<ABullet>(GetWorld(), bullet, Socket0Loc, Socket0Rot);
  8. bul->SetVelocity(floatingMovement->Velocity);
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement