if (MuzzleFlash)
{
UGameplayStatics::SpawnEmitterAtLocation(GetMesh(), MuzzleFlash, FP_Gun->GetSocketLocation(FName(“Muzzle”)));
}
I have messed around in the particle editor in order to be able to find the reason why the muzzleflash rotates itself when I rotate the character I am not sure if it is the muzzle socket itself or the muzzleflash emitter. Does anyone have any recommendations on how to keep the rotation static. When Firing a weapon.
I didn’t have this problem and I spawned my emiter like this:
UGameplayStatics::SpawnEmitterAttached(MuzzleFlash, Mesh, TEXT("MuzzleFlashSocket"));
I tried your code and mine both result in the MuzzleFlash not being able to be static. When facing different directions.
This is really off I don’t know why the emitter rotates when I turn…
I know one thing for a fact that the particle system is attached to the muzzle.
I set the mesh data to camera facing and it fixed the MuzzleFlash problem. If anyone is having this problem this might be the solution.