Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 a = transform.position;
- Vector3 b = new Vector3(5, 10, 10);
- private void FixedUpdate()
- {
- float step = speed * Time.deltaTime;
- transform.position = Vector3.MoveTowards(a, b, step);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement