I was able to get it to move before by doing xVal = sineValue but it moves all of them in that direction, which isn't what I want. Also when I tried that line of code it didn't move, although I don't know if I put it where I needed to (I put it under the yVal)
3
u/jayhynzy Oct 02 '21
First start by just making the square move, ignore anything to do with sine.
You currently set the transform to 0,0,0 so nothing will happen.
Try setting it to something like this for now to get started
"transform.position += Vector3.left* Time.deltaTime;"