导入资源包
搭建初始场景
创建黄色方块转动
转动代码:
public class RotatePickUp : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
this.transform.Rotate(new Vector3(15,30,45)*Time.deltaTime);
}
}
创建黄色滚动圆环
step1:创建黄色方块并放入materials->Prefabs
step2:
自动生成12个围绕sphere的方块,外加摄像机自动跟随sphere。
代码拖到main camera上面
public class CameraController : MonoBehavi