using UnityEngine;
public class RotateObj : MonoBehaviour
{
private void Update()
{
// rotate to its own axis
transform.Rotate(new Vector3(Random.value, Random.value, Random.value));
// rotate about axis passing through the point in world coordinates
transform.RotateAround(Vector3.zero, Vector3.up, 1.0f);
}
}
1 回答
我认为它可以解决你的问题 . 这是您需要的脚本:
这是你的统一配置:
它围绕自身(随机)和
Vector3.zero
坐标旋转