created player movement, jump and run faster
This commit is contained in:
20
Assets/Scripts/CameraMovement.cs
Normal file
20
Assets/Scripts/CameraMovement.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraMovement : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject player;
|
||||
[SerializeField] float offsetY = 0;
|
||||
[SerializeField] float interpolate = 0.2f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
transform.position = Vector2.Lerp(transform.position, player.transform.position + new Vector3(0, offsetY, 0), .2f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user