Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Pusher : MonoBehaviour {
- float oz;
- void Start () {
- oz = transform.position.z;
- }
- void FixedUpdate()
- {
- Vector3 pos = transform.position;
- pos.z = oz + Mathf.Sin(Time.time) * 0.05f;
- transform.position = pos;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment