I'm having a weird problem. I'm sure its something to do with my math.
I have several gameObects called rows stored in an ArrayList. Inside each row I have a couple child game objects. In the main GameManger I loop through each row and update its position based on a speed value.
heres the code,
//Loop through the rows and move them
for(int i = 0; i < rows.Count; i++)
{
GameObject row = (GameObject)rows*;
* _float moveAmount = moveSpeed * Time.deltaTime;_ _row.transform.Translate(Vector3.down * moveAmount);
_ *}
* *I set the moveSpeed to 6.0f as a variable at the beginning of the class. But it doesn't seem to change speed when I change the value. I've even tried 100.0f and it still moves at the same speed?
* *I also tried setting the transform manually like the following
* *row.transform.position = new Vector3(row.transform.position.x, row.transform.position.y - moveAmount, row.transform.position.z);
* *But that has the same effect.
* *It's weird. I'm guessing my maths wrong on the multiplication and the time.deltatime because if I remove that part it moves fast.
*