A cleaner way to get ShotDirection?

As Rotation is aleady an FRotator, Can we use

FRotator ShotDirection = Rotation.GetInverse();
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactEffect, Hit.Location, ShotDirection);

instead of

FVector ShotDirection = -Rotation.Vector();
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactEffect, Hit.Location, ShotDirection.Rotation());

?

1 Like

Sure that seems fine.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms