Skip to content

Instantly share code, notes, and snippets.

@gkagm2
Created April 17, 2019 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkagm2/3ea1cc81a089090f1cab3892b4150e51 to your computer and use it in GitHub Desktop.
Save gkagm2/3ea1cc81a089090f1cab3892b4150e51 to your computer and use it in GitHub Desktop.
Random.onUnitShere (산탄 만들때 사용)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MyRandomOnUnitSphere : MonoBehaviour {
// Update is called once per frame
void Update () {
Vector3 start = Random.onUnitSphere;
Debug.DrawLine(start - Vector3.forward * 0.01f, start + Vector3.forward * 0.01f, Color.green, 50.0f);
Debug.DrawLine(start - Vector3.right * 0.01f, start + Vector3.right * 0.01f, Color.green, 50.0f);
Debug.DrawLine(start - Vector3.up * 0.01f, start + Vector3.up * 0.01f, Color.green, 50.0f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment