Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class SineWaveAnimation : MonoBehaviour {
- public float baseSize = 1f;
- void Update() {
- float animation = baseSize + Mathf.Sin(Time.time * 8f) * baseSize / 7f;
- transform.localScale = Vector3.one * animation;
- }
- }
Add Comment
Please, Sign In to add comment