19/03/05 15:47:15.85 CxDtBk+6.net
>>979
そりゃあTime.deltaTimeのところをどう書いたらいいかって質問への回答だから、もちろんこのまま貼り付けても期待通りには動かんよ。
Vector3 current = new Vector3( 1, 0, 0 );
Vector3 target = new Vector3( 10, 10, 10 );
float duration = 3.0f;
float speed;
void Start()
{
this.speed = (this.target - this.current).magnitude / this.duration;
}
void Update()
{
this.current = Vector3.MoveTowards( this.current, this.target, this.speed * Time.deltaTime );
this.transform.position = this.current;
}
Vector3.MoveTowardsのリファレンスちゃんと読んでる?