Created
April 17, 2019 02:33
-
-
Save gkagm2/3ea1cc81a089090f1cab3892b4150e51 to your computer and use it in GitHub Desktop.
Random.onUnitShere (산탄 만들때 사용)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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