code:
var Player : Transform;
var RotateSpeed = 20;
function Update ()
{
transform.RotateAround (Player.position, Vector3.up, RotateSpeed * Time.deltaTime);
}
when the player move,the radius change.
Someone can help me?
code:
var Player : Transform;
var RotateSpeed = 20;
function Update ()
{
transform.RotateAround (Player.position, Vector3.up, RotateSpeed * Time.deltaTime);
}
when the player move,the radius change.
Someone can help me?
Rotate a vector constantly, eg. about Y axis:
var v = Quaternion.AngleAxis(Time.time * speed, Vector3.up) * Vector3(radius,0,0);;
then position your target at that displacement:
transform.position = Player.position + v;
The object will orbit the player. Separately, decide which way it should face.