Use projectile movement component twice for an actor

I went through same issue just now; eventually solved by following steps:

Before each projection:

  • Deactivating the component
  • Re-assign the updated component ( the root component)
  • Re-Initializing the Velocity vector
  • Activating the component

-Velocity vector indeed seems to be reset to 0 after the component is de-activated.
-If the previous projection movement ended, somehow the deactivate/reactivate is not enough.

I did it in C++ but I would imagine it can be achieved in blueprints as well.\

ProjectileMovementComponent->Deactivate();
ProjectileMovementComponent->SetUpdatedComponent(GetRootComponent());
ProjectileMovementComponent->Velocity = VelocityNormalized * ProjectileMovementComponent->InitialSpeed;
ProjectileMovementComponent->Activate();
1 Like