The current way of aligning the barrel when the player aims seems clunky and roundabout. Maybe try finding a simpler way that doesn't use SuggestProjectileVelocity and relies just on de-projecting through the crosshair to get the point in the world where the player is aiming and then projecting a vector from the barrel to that point and having the tank align with that vector. Using SuggestProjectileVelocity makes for the best-feeling aiming system when it actually works. The issue is that it breaks when the player aims at something far off, i.e. the tank barrel and turret don't move. The tank barrel should always aim at the crosshair, even if what the player is aiming at is out of range.
Change TankAimingComponent::AimAt() to take in a LaunchVelocity FVector directly i.e. just a vector that the barrel will align itself with rather than using SuggestProjectileVelocity.
The vector to align the barrel with is a de-projection that goes from the origin of the tank barrel through the crosshair
The current way of aligning the barrel when the player aims seems clunky and roundabout.
Maybe try finding a simpler way that doesn't use SuggestProjectileVelocity and relies just on de-projecting through the crosshair to get the point in the world where the player is aiming and then projecting a vector from the barrel to that point and having the tank align with that vector.Using SuggestProjectileVelocity makes for the best-feeling aiming system when it actually works. The issue is that it breaks when the player aims at something far off, i.e. the tank barrel and turret don't move. The tank barrel should always aim at the crosshair, even if what the player is aiming at is out of range.