Hi guys,
I’ve been looking at this piece of code for far too long to the point I’m nearly bald. ![]()
The for loop works fine but the Vector3 positions are double the amount in the editor.
Example:
8, 0, 0 will show as 16, 0, 0
0, 0, 16 will show as 0, 0, 32
Here’s the C# code below.
public List<Transform> CompletedSet = new List<Transform>();
public List<Vector3> CoveSet = new List<Vector3>();
void Start() {
CSCount = CompletedSet.Count;
SetAltar();
}
void SetAltar() {
if (CSCount > 0) {
// Get Cove List
for (int gcl = 1; gcl < CSCount; gcl++) {
Vector3 CovePos = CompletedSet[gcl].transform.position;
float cax = (float)CovePos.x;
float caz = (float)CovePos.z;
if(CompletedSet[gcl].transform.childCount == 3){
CoveSet.Add (new Vector3 (cax, 0f, caz));
}
}
}