Problem shooting projectiles at fast moving targets


I have set up my shooting so that if the player is aiming close to a “Aim box” around the target the aim will auto aim at the target. the problem here is that, even if the projectiles are very fast, they will be slightly behind target if the target is moving fast… so which was I need to make the projectile work ? I guess I might need to move the auto aim based on target velocity but have no idea how to do it.?

and yes I did do raycasts but I prefer projectiles as they fit more but then I face this problem

No, i’m Instantiating projectiles toward aim position.