Skip to content

Instantly share code, notes, and snippets.

@nopitech
Created July 9, 2018 11:55
Show Gist options
  • Save nopitech/7478d2ccb4e11e2f20590a1adcb1360f to your computer and use it in GitHub Desktop.
Save nopitech/7478d2ccb4e11e2f20590a1adcb1360f to your computer and use it in GitHub Desktop.
2点間の移動
using UnityEngine;
public class VectorScript : MonoBehaviour
{
void Update()
{
Vector3 from = Vector3.zero;
Vector3 to = Vector3.one*10;
transform.position = Vector3.Lerp(from, to, Time.time * 0.3f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment