I try to make a pong clone and have an Actor with a ProjectileMovementComponent as ball.
When it hits something I get notified and want to reset it to its starting position, I do that with SetActorLocation
void AMyBall::ResetPosition()
{
SetActorLocation(StartPosition, false);
ProjectileMovement->Velocity = StartVelocity * ProjectileMovement->InitialSpeed;
ProjectileMovement->UpdateComponentVelocity();
}
StartPosition and StartVelocity is saved in the constructor.
The projectile does move to the set position, but lost all its velocity.
How do I make the projectile start moving again?