Guest User

Untitled

a guest
Dec 17th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class SineWaveAnimation : MonoBehaviour {
  4. public float baseSize = 1f;
  5.  
  6. void Update() {
  7. float animation = baseSize + Mathf.Sin(Time.time * 8f) * baseSize / 7f;
  8. transform.localScale = Vector3.one * animation;
  9. }
  10. }
Add Comment
Please, Sign In to add comment