Bullet slowing down while snapping to sphere normals

I’m having an issue where a bullet will slow down and stop after a short period of time while snapping to surface normals of a sphere. Here is the code I am using:

function Update () {
	transform.Translate(Vector3.forward * Time.deltaTime * bulletSpeed);
	//transform.position += transform.forward * bulletSpeed * Time.deltaTime;
	
	//Gets rotation object info
	var globePos = new Vector3(0,0,0);
	initCastDir = globePos - transform.position;
	var hit: RaycastHit;
	
	if (Physics.Raycast (transform.position, initCastDir, hit))
	{
		Debug.DrawRay (transform.position, initCastDir * 10, Color.blue);
		
		transform.position = hit.point;
	}
	
	
	
}

I can resolve this if I use this line in the raycast statement:

transform.rotation = Quaternion.FromToRotation (Vector3.up, hit.normal);

Unfortunately this forces the bullet to travel only upwards and makes it unable to rotate to the transform of the player.

Can anyone shed any light on this?

So if I understand correctly, you want the bullet to curve around to follow a sphere. You can do it with a raycast as you have done. The line of code you want is:

transform.rotation = Quaternion.FromToRotation(transform.up, hit.normal) * transform.rotation;

But I’d be a bit concerned about accuracy. That is, while we see a sphere, the object is really a mesh with triangles. Since it is a sphere you can calculate the vector more directly:

var globeUp = transform.position - globePos;
transform.rotation = Quaternion.FromToRotation(transform.up, globeUp) * transform.rotation;