Rotation

Hey Folks :slight_smile:

I like an object2 rotate around object1.

this is what I found out so far:

var object1 : GameObject;

function Update () {


if (crate_active.crateactive == true)
{
transform.RotateAround (Vector3.zero,Vector3.up, -80 * Time.deltaTime);
}
}

Now … how can I change the radius the object is rotating with?
Could you help me please?

Cheers!

Dawnreaver

object2.position = (object2.position - object1.position).normalized * newDistance + object1.position