Transform操作——平移旋转缩放
Transform操作——平移旋转缩放
1.移动
transform.Translate(Vector3.left * (mouse_x * 15f) * Time.deltaTime);
cube.transform.position = cube.transform.position + new Vector3 (0.5f, 0f, 0f);
2.旋转
cube.transform.Rotate (new Vector3(0, 10, 0));
cube.transform.RotateAround (cylinder.transform.position, Vector3.up, 10);
3.缩放
cube.transform.localScale *= 1.2f;