Okay, so here goes, Engine version 4.5.1. What a project upgraded from 4.4.x. Code is from 4.5.1 though for this actor (created and generated).
The ctor is as follows for the components:
AIBProjectile::AIBProjectile(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
SphereComponent = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("SphereComponent"));
RootComponent = SphereComponent;
ProjectileComponent = PCIP.CreateDefaultSubobject<UProjectileMovementComponent>(this, TEXT("ProjectileMovementComponent"));
ProjectileComponent->UpdatedComponent = SphereComponent;
ProjectileComponent->InitialSpeed = 3000.f;
ProjectileComponent->MaxSpeed = 3000.f;
ProjectileComponent->bRotationFollowsVelocity = true;
ProjectileComponent->bShouldBounce = true;
ProjectileComponent->Bounciness = 0.3f;
MeshComponent = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("MeshComponent"));
MeshComponent->AttachTo(RootComponent);
SphereComponent->bGenerateOverlapEvents = true;
SphereComponent->OnComponentBeginOverlap.AddDynamic(this, &AIBProjectile::OnHit);
bBeginExpiration = false;
}
AIBProjectile derives from AActor. Naturally, the code was/has/is verbatim of what is in the tutorials. I am having and issue of where the staticmesh component refuses to update with the Projectile Component OR the Sphere Component. I have done both the StaticMeshComponent attached and not attached to the RootComponent. It spawns at 0,0,0, every single time. I am curious if anybody knows how to / or has fixed this issue before?