public Vector3 RandomCircle(Vector3 center, float radius){
float ang = UnityEngine.Random.Range(0, 360);
Vector3 pos = Vector3.zero;
pos.x = center.x + radius * Mathf.Cos (ang * Mathf.Deg2Rad);
pos.y = center.y + radius * Mathf.Sin (ang * Mathf.Deg2Rad);
pos.z = center.z;
return pos;
unity 围绕圆心,取半径上一点
最新推荐文章于 2024-03-05 10:11:20 发布