In the example from the following ScriptReference in the Unity Documentation I found something that I still can’t explain to myself. I made a solid research around the net but not even a clue appeared for me. So, I hope I can find a comprehensive answare here. Please, keep in mind that I am not an expert and my be the answer is infront of my face but I just can’t see it!
Here is the reference:
http://docs.unity3d.com/ScriptReference/NavMesh.SamplePosition.html
My question is the following - in the example script for the NavMesh.SamplePosition a variable “Vector3 center” is created , and later referenced 2 lines below in the “Vector3 randomPoint” vector variable.
I have searched everywhere for this “Vector3 center” but it just does not exists.
Even in the proper Script Reference for the Vector3:
So please, can anyone explain what is the value of this “center” Vector3, and how did it get any value to be assigned two lines below? I just don’t get it. I undertand all the rest of the script, just this detail is not clear.
Is it the center of the NavMeshAgent? And if it is, how is that this parameter “center” does not appear on the reference page for the Vector3? :S I am so confused, please, help will be very appreciated.
Thanks in advance.