Transform.RotateAround Pro

Iv read the doc on rotatearound and am wondering how to use it to make a sun orbit a planet, so far it wont move the object it only rotates the eulerAngles, how do I make it move as well?

private var t : Transform;
var RotatePoint : Vector3;
var rotatespeed : float;

function Start(){
t = transform;
}
function FixedUpdate () {
t.RotateAround(t.position + t.forward,Vector3.right,rotatespeed*Time.deltaTime);
}

the point is the pos I want it moving around

thanks

You must define the point around which your object should rotate:

 t.RotateAround(RotatePoint,Vector3.right,rotatespeed*Time.deltaTime);

NOTE: It would be better if you used a Sun variable in your script and dragged the sun object to it:

private var t : Transform;
var Sun : Transform;  // object around which the planet should orbit
var rotatespeed : float;

function Start(){
  t = transform;
}
function FixedUpdate () {
  t.RotateAround(Sun.position,Vector3.right,rotatespeed*Time.deltaTime);
}

I’m supposing the planet should orbit the sun, and not the other way around (as you said in your question…)