RotateAround with direction

Hello guys. Right now I’ve got my player that can walk around on a spherical world. What I now want to achieve is: whenever I shoot, the bullet Im going to instantiate has to rotate around the sphere on the forward direction. I got both the center of my planet and the direction where I want to shoot it, but I cant make the RotateAround work with the direction, as it needs an axis. Any idea would be appreciated.

@Fabio23000, Perhaps you are confusing “an axis” with the predefined axes that unity provides? RotateAround is not locked to the World Up, Right, or Forward vectors - eg. Vector3.up. You can RotateAround any orientation you wish.

For example, given target is the center of rotation, you can reorient target to make the game object this script is attached to rotate around the local “right” direction of the target no matter which way right is oriented. it is not locked to Vector3.right:

using UnityEngine;

public class RotateMe : MonoBehaviour {

	//Assign a GameObject in the Inspector to rotate around
	public GameObject target;
	public float speed = 50f;

	void Update() {
		// Spin the object around the target at 20 degrees/second.
		transform.RotateAround( target.transform.position, target.transform.right, speed * Time.deltaTime );
	}
}

So use your player’s transform.right as the axis parameter (assuming forward is the direction you are shooting) and the projectile will orbit the planet in the direction you are facing.