hi all,
I started with ball game c++ template. I want to imediately cancel the ball movement when i call my StopBallMovement() function .
here is my function to move the ball :
void ABallBall::MoveForward(float Val)
{
// find out which way is forward
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
// fVector mouvement
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
Ball->AddTorque(Direction * Val * RollTorque );
}
Thanks