public class BucketController : MonoBehaviour {
public Obi.ObiEmitter emitter;
// Update is called once per frame
void Update () {
//旋转碗口
if (Input.GetKey(KeyCode.D)){
//某个轴的角度变化
//transform.rotation = Quaternion.RotateTowards(transform.rotation, Quaternion.AngleAxis(90,-transform.forward),Time.deltaTime*50);
transform.rotation = Quaternion.RotateTowards(transform.rotation, Quaternion.Euler(0,0,-90),Time.deltaTime*50);
}else{
transform.rotation = Quaternion.RotateTowards(transform.rotation, Quaternion.identity,Time.deltaTime*100);
}
}
}
unity基础之实现平滑旋转
最新推荐文章于 2024-07-20 15:03:35 发布