Download

关于粒子问题,粒子效果在地图原点,没有跟着炮弹

UPROPERTY(VisibleAnywhere, Category = “Component”)
UStaticMeshComponent* ComponentMesh = nullptr;

UPROPERTY(VisibleAnywhere, Category = “Component”)
UParticleSystemComponent* LaunchParticle = nullptr;

UPROPERTY(VisibleAnywhere, Category = “Component”)
UParticleSystemComponent* ImpactParticle = nullptr;

ComponentMesh = CreateDefaultSubobject<UStaticMeshComponent>(FName(“ComponentMesh”));
SetRootComponent(ComponentMesh);
ComponentMesh->SetNotifyRigidBodyCollision(true);
ComponentMesh->SetVisibility(true);

LaunchParticle = CreateDefaultSubobject<UParticleSystemComponent>(FName(“LaunchParticle”));
SetRootComponent(RootComponent);
//LaunchParticle->SetVisibility(true);
LaunchParticle->SetAutoActivate(true);

ImpactParticle = CreateDefaultSubobject<UParticleSystemComponent>(FName(“ImpactParticle”));
SetRootComponent(RootComponent);
//ImpactParticle->SetVisibility(true);
LaunchParticle->SetAutoActivate(false);

粒子效果在地图原点,没有跟着炮弹??版本4.19

particle Use Local space 打勾看看