UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a rocket"
ARocket::ARocket() { PrimaryActorTick.bCanEverTick = true; MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh Component")); RootComponent = MeshComponent; ParticleSystemComponent = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("Particle System Component")); ParticleSystemComponent->SetupAttachment(RootComponent); MovementComponent = CreateDefaultSubobject<UProjectileMovementComponent>(TEXT("Movement Component")); MovementComponent->InitialSpeed = 2000.0f; MovementComponent->MaxSpeed = 2000.0f; MovementComponent->bRotationFollowsVelocity = true; MovementComponent->bShouldBounce = false; MovementComponent->ProjectileGravityScale = 0.0f; }