public static Vector3 onUnitSphere ;

Descripción

Devuelve un punto aleatorio sobre la superficie de una esfera de radio 1 (Read Only).

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Sets the rigidbody velocity to 10 and in a random direction.

GetComponent<Rigidbody>().velocity = Random.onUnitSphere * 10; } }