using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public Transform start;
public Transform end;
public float speed;
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position = Vector3.MoveTowards(start.position, end.position, speed * Time.deltaTime);
}
}
我想要 如果tansform start位置 等于 transform end位置時打開剛體的重力,求大佬教下怎么寫。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/96304.html
標籤:應用程序開發區
