Here is my fast projectile “pimped up”:
The blend was free, and downloaded from https://www.turbosquid.com/FullPreview/Index.cfm/ID/1192030.
Once imported I changed the scale of the blend from 1 to 10 to make it more pronounced/visible in game.
Edit:
You’ll also want to orientate the arrow so it is facing the player/target.
From Enemy.cs:
private void SpawnProjectile()
{
// Create a new instance of the projectile and set it's damage caused
GameObject newProjectile = Instantiate(projectileToUse, projectileSocket.transform.position, Quaternion.identity);
Projectile projectileCompoment = newProjectile.GetComponent<Projectile>();
projectileCompoment.SetDamage(damagePerShot);
// Gets a vector that points from the player's position to the target's.
Vector3 heading = (player.transform.position + aimOffset) - newProjectile.transform.position;
float distance = heading.magnitude;
Vector3 direction = heading / distance; // This is now the normalized direction.
// Set the velocity of the new projectile
float projectileSpeed = projectileCompoment.projectileSpeed;
newProjectile.GetComponent<Rigidbody>().velocity = direction * projectileSpeed;
**//Orientate the arrow so it is facing the player**
newProjectile.GetComponent<Rigidbody>().transform.transform.forward = direction;
}