r任务5:控制小球旋转
//在定义中定义速度是90
public float speed = 90;
// Update里设置旋转速度是90
void Update(){
transform.Rotate(new Vector3(0,0,speed*Time.deltaTime));
}
r任务5:控制小球旋转
//在定义中定义速度是90
public float speed = 90;
// Update里设置旋转速度是90
void Update(){
transform.Rotate(new Vector3(0,0,speed*Time.deltaTime));
}
旋转:
public class RotateSelf : MonoBehaviour
{
public float Speed = 90;
// Update is called once per frame
void Update()
{
transform.Rotate(new Vector3(0,0,-Speed * Time.deltaTime));
}
}
控制小球旋转
1、创建脚本RotateSelf,放在circle下