I have a problem with the turret rotation when i turning to the left side of the tank the turret is acting as expected but when i turning the view to the right side of the tank the turret is aiming to the opposite side - its like it is rotating only on the left side of the tank.
i pleased logs each time in a different place and used the trace to make sure the calculation of the target is correct - everything was as expected.
when i added a specific log before the MoveBarrelTowards call (in the tankAimingComponent.cpp) the turret started to turn as expected for both sides.
i had different logs at that place but for some reason only that specific log is fixing the issue
(i am working with UE 4.22)
any idea what might be the problem?
if (bHaveAimSolution)
{
auto AimDirection = OutLaunchVelocity.GetSafeNormal();
auto Time = GetWorld()->GetTimeSeconds();
auto OurTankName = GetOwner()->GetName();
UE_LOG(LogTemp, Warning, TEXT("Out Launch Velocity before Normal: %s after Normal: %s"), *OutLaunchVelocity.ToString(), *AimDirection.ToString());
//UE_LOG(LogTemp, Warning, TEXT("Out Launch Velocity before Normal: %s"), *OutLaunchVelocity.ToString());
//UE_LOG(LogTemp, Warning, TEXT("%f: %s, Aiming solution found %s"), Time, *OurTankName ,*AimDirection.ToString());
MoveBarrelTowards(AimDirection);
else {
//if no solution found do nothing
auto Time = GetWorld()->GetTimeSeconds();