- Home /
Question by
Bokaii · Oct 26, 2014 at 01:39 PM ·
multiplayerfpspathfindingonline
Find closest transform
How do I find the closest transform of:
public GameObject test;
public Transform[] nodes;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
nodes = test.GetComponentsInChildren<Transform>();
nodes [0] = nodes [nodes.Length - 1];
}
Comment
Answer by bubzy · Oct 26, 2014 at 01:41 PM
http://msdn.microsoft.com/en-us/library/ttw7t8t6.aspx
im posting links because it really is better to learn for yourself :)
Your answer
Follow this Question
Related Questions
Find closest object with tag 1 Answer
Find children of object and store in an array 3 Answers
Remove first element of array 1 Answer
Closest array element 1 Answer
Add one on local z axis 3 Answers