- Home /
How do i fix Error CS0029?
Hello i am Getting this Error CS0029 with spherePoints = new Vector3[(sphereAmount + 1)];
,
I after i changed`private Vector3[] spherePoints` to private Transform[] spherePoints
, does anyone know how to fix this?
Answer by LK84 · Aug 11, 2016 at 10:08 PM
Well, what do you want. An Array of Vector3 or Transform? It's either private Vector3[] spherePoints=new Vector3[sphereAmount + 1];
or private Transform[] spherePoints=new Transform[sphereAmount + 1]
Casting from Vector3 to Transform or vice-versa makes no sense and is not possible.
I am trying to have a vector3[] to a transform[] take a look at this thats what i am trying to achieve.
It's a little bit too late to go through all the code but all I can say it's impossible to cast between Vector3 and Transform. It's like telling a banana to be an apple. It makes No sense.
Ok, but is there a way to have a transform[](obPos) to have the same positions as the Vector3[](pos) for example,
obPos[].position = pos[];
yet when i do this command it does not work.