Using ImpactPoint instead?

In the course Sam uses the SpawnEmitterAtLocation version that has a Location and Rotation Argument.

Instead i used the version that uses takes a Transform and used Hit.ImpactPoint for the values.

I havent noticed a difference, is there any reason to not use .ImpactPoint?

UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactEffect, HitResult.ImpactPoint);

my version

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

course version

It is the same for line traces

Equal to the point of impact for line tests

There is only a difference when using one of the shapes for tracing

See the docs:
https://docs.unrealengine.com/en-US/API/Runtime/Engine/Engine/FHitResult/Location/index.html
https://docs.unrealengine.com/en-US/API/Runtime/Engine/Engine/FHitResult/ImpactPoint/index.html

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

Privacy & Terms