edx/assignment8final/Assets/ProtoPack/Scripts/PlatformLiftTest.cs

25 lines
334 B
C#
Raw Normal View History

2022-11-10 21:56:29 -03:00
using UnityEngine;
using System.Collections;
public class PlatformLiftTest : MonoBehaviour
{
Vector3 startPos;
float sinFloat;
void Start ()
{
startPos = transform.position;
}
void Update ()
{
sinFloat = Mathf.Sin (Time.time) / 2 + 0.5f;
transform.position = startPos + new Vector3 (0f, sinFloat, 0f);
}
}