Browse Source

Moving platforms fixed

Level 2 ground fixed
jeff
Jeff 2 years ago
parent
commit
a5a31d0962
3 changed files with 4 additions and 4 deletions
  1. BIN
      Assets/Scenes/Level 2.unity
  2. +1
    -1
      Assets/Scripts/PlatformMover.cs
  3. BIN
      Assets/Variables/Runtime/freezePlayer.asset

BIN
Assets/Scenes/Level 2.unity (Stored with Git LFS) View File

size 442128

+ 1
- 1
Assets/Scripts/PlatformMover.cs View File

@ -17,7 +17,7 @@ public class PlatformMover : MonoBehaviour
// Update is called once per frame
void Update()
{
transform.position = Vector2.Lerp(m_StartPos.position, m_EndPos.position, Mathf.PingPong(Time.deltaTime * m_Duration, 1.0f));
transform.position = Vector2.Lerp(m_StartPos.position, m_EndPos.position, (Mathf.Sin(Time.time * m_Duration) + 1.0f) / 2.0f);
}
#if UNITY_EDITOR

BIN
Assets/Variables/Runtime/freezePlayer.asset (Stored with Git LFS) View File

size 466

Loading…
Cancel
Save