Hey, my first contribution!
I found it really awkward the way the enemy ships move in realm rush, just kind of suddenly appearing over the blocks, so I crafted a bit of code to smooth out their movement.
public class EnemyMovement : MonoBehaviour
{
Pathfinder pathfinder;
Vector3 velocity = Vector3.zero;
Vector3 targetPosition;
public void Start()
{
pathfinder = FindObjectOfType<Pathfinder>();
var path = pathfinder.GetEnemyPath();
StartCoroutine(FollowPath(path));
}
IEnumerator FollowPath(List<WayPoint> path)
{
foreach (WayPoint step in path)
{
targetPosition = step.transform.position;
yield return new WaitForSeconds(1f);
}
}
public void LateUpdate()
{
transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, 0.3f);
transform.LookAt(targetPosition);
}
}
I essentially just created an instance variable targetPosition containing the position of the steps as the Coroutine spits them out. Then I used it as the target position in the Vector.SmoothDamp() method.