void Update() {
float timeOffset = initialPosition.x; // for this to work, cubes should be written from -x to +x direction;
Vector3 positionAdjustment = new Vector3(Mathf.sin(Time.time + timeOffset) 0.1f, 0, Mathf.cos(Time.time + timeOffset) 0.1f);
transform.position = initialPosition + positionAdjustment;
}
Here's your template for the letters
XX XXX XXX
X X X X X
XXXX XXX X
X X X X X
X X XXX XXX
Manually place cubes (for now) in a scene according to the ASCII template I'm showing below.
All cubes have a script called LetterWiggle.cs or something like that.
void Update() { float timeOffset = initialPosition.x; // for this to work, cubes should be written from -x to +x direction; Vector3 positionAdjustment = new Vector3(Mathf.sin(Time.time + timeOffset) 0.1f, 0, Mathf.cos(Time.time + timeOffset) 0.1f); transform.position = initialPosition + positionAdjustment; }
XX XXX XXX X X X X X XXXX XXX X X X X X X X X XXX XXX