When my particle hit on object, the effect always places at 0,0,0 not at the hit location. I have very simple setup:
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
ProjCollision = CreateDefaultSubobject<USphereComponent>(TEXT("SphereComp"));
check(ProjCollision);
ProjCollision->InitSphereRadius(10.0f);
ProjCollision->BodyInstance.SetCollisionProfileName("BlockAll");
ProjCollision->OnComponentHit.AddDynamic(this, &ABMProjectile::OnHit);
OnDestroyed.AddDynamic(this, &ABMProjectile::OnDestoryedProjectile);
ProjCollision->SetWalkableSlopeOverride(FWalkableSlopeOverride(WalkableSlope_Unwalkable, 0.0f));
ProjCollision->CanCharacterStepUpOn = ECB_No;
RootComponent = ProjCollision;
ProjMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
check(ProjMesh);
ProjMesh->AttachToComponent(ProjCollision, FAttachmentTransformRules::KeepRelativeTransform);
ProjMesh->SetCollisionProfileName("NoCollision");
ProjParticle = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("ParticleComp"));
check(ProjParticle);
ProjParticle->bAutoActivate = false;
ProjParticle->AttachToComponent(ProjCollision, FAttachmentTransformRules::KeepRelativeTransform);
ProjMovement = CreateDefaultSubobject<UProjectileMovementComponent>(TEXT("ProjectileComp"));
check(ProjMovement);
ProjMovement->UpdatedComponent = ProjCollision;
ProjMovement->InitialSpeed = 3000.0f;
ProjMovement->MaxSpeed = 3000.0f;
ProjMovement->bRotationFollowsVelocity = true;
ProjMovement->bIsHomingProjectile = true;
ProjMovement->HomingAccelerationMagnitude = 10000.0f;
InitialLifeSpan = 3.0f;