local framevalue = vci.me.Time.TotalSeconds local framestart = 0 local sub = vci.assets.GetTransform("Sub") local pointA = Vector3.__new(0,1,0)--A地点 local pointB = Vector3.__new(0,1,0)--B地点 local pointnow =Vector3.zero local moveflag = 0 local distance = 0.01 --この距離以下になったら停止 function updateAll() if moveflag==1 then framevalue = (vci.me.Time.TotalSeconds-framestart)/4 --この場合は4秒かけて移動 --A地点からB地点まで補間してN秒間で移動 pointnow = Vector3.Lerp(pointA,pointB,framevalue) sub.SetLocalPosition(pointnow) if Vector3.Magnitude(sub.GetLocalPosition()-pointB)