Hey so i have an array of GameObjects which correspond to another array of game objects.
What im going to do is use a foreach loop to see which ones has the z axis at the number i want and then if it is make the same array element number of another GameObject array active aswell,
So basically if Obj[1] is in the right place on the Z axis then SecondObj[1] will be made active
If you’re comparing floating point numbers (such as transform.position.z) be sure you do so by asking if the difference between the two values is below a certain amount. NEVER check floating point numbers for equality. Here’s why.
Floating (float) point imprecision:
Never test floating point (float) quantities for equality / inequality. Here’s why: