言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Vector2.Lerp

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static function Lerp(from: Vector2, to: Vector2, t: float): Vector2;
public static Vector2 Lerp(Vector2 from, Vector2 to, float t);
public static def Lerp(from as Vector2, to as Vector2, t as float) as Vector2

Description

直線上にある2つのベクトル間を補間します

fromfromto の間を補間します。 from は [0...1]の間に制限されています。 from = 0 の時は from を返します。 to = 1 の時は to を返します。 from = 0.5 の時は fromto の平均(ちょうど真ん中)を返します。