Im trying to build a beam particle system, very much like the “P_AssaultRifle_Trail” that comes with the ShooterGame example.
When using the version from ShooterGame everything works fine, the beam goes to where I shoot.
But when I created my own from scratch, matching each module setting to the original – it doesnt set the beam to where it should go.
The only difference I can still see is that Source and Target are marked “Source+” and “Target+”. This seems the only difference i cannot replicate. Whats the deal with that? Could it be that which is messing up my version of the beam?
Both versions go through the same function that sets the beam target parameter… Anyone run into this problem? Im using version 4.8.2…
Heres the snippit that sets the particle parameters
void ABerserkWeaponActor::DrawTrailToPoint(FVector EndPt)
{
DrawDebugSphere(GetWorld(), EndPt, 24, 32, FColor::FColor(0, 0, 0), false, 5.f);
FVector muzzleLoc = WeaponMesh->GetSocketLocation("MuzzleFlashSocket");
if (MuzzleFX && muzzleLoc.Size())
{
UParticleSystemComponent* TrailPSC = TrailPSC = UGameplayStatics::SpawnEmitterAtLocation(this, MuzzleFX, muzzleLoc);
if (TrailPSC)
TrailPSC->SetVectorParameter("ShockBeamEnd", EndPt);//TrailPSC->SetBeamTargetPoint(1, EndPt, 1);
}
}
Heres pics of what im talking about