onUnitCircle
Returns a random point on the circumference of a circle with radius 1.0 (Read Only).
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static Vector2 onUnitCircle { get; }
Examples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // Sets the Rigidbody2D velocity to 10 and in a random 2D direction. GetComponent<Rigidbody2D>().linearVelocity = Random.onUnitCircle * 10; }}