Help us understand the problem. What is going on with this article?


More than 3 years have passed since last update.

Vector3.Lerp と Quaternion.Lerp が便利

using UnityEngine;
using System.Collections;

public class BlendedPosition : MonoBehaviour
    [SerializeField] private Transform a;
    [SerializeField] private Transform b;

    void Start ()


    void Update ()
        transform.position = Vector3.Lerp(a.position, b.position, 0.5f);
        transform.rotation = Quaternion.Lerp(a.rotation, b.rotation, 0.5f);


そもそも2点間の中間をもとめるには、補間方法が違う Lerp と Slerp があります。


補間の違いについては下記コメントの @Ushio@github さんのコードがすごく分かりやすいです。

Creative Technologist
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away