fHit:Vector3;
sHit:Vector3;
vertsArray = Array();
(...)
for(vertex:Vector3 in hitMesh.vertices){
vertsArray.Add(vertex);
}
when I do this later:
newMesh.vertices = [fHit, sHit, vertsArray[0]];
unity warns me it can't cast from source type to destination type. showing "`(Vector3 fHit, Vector3 sHit)`" as the reason. doesn't it notice the `vertsArray[0]` here?
when I do
temp = vertsArray[0];
and change it to
newMesh.vertices = [fHit, sHit, temp];
everything is ok.
Are we not allowed to use arrays to store - and later pass - vertices positions?