unity 5.65 中 得到animation组件
private animation anim;
private void start()
{
anim=getComponentInvhildren<Animation>();
}
(教程anim.getComponentInvhildren<Animation>();)
unity 5.65 中 得到animation组件
private animation anim;
private void start()
{
anim=getComponentInvhildren<Animation>();
}
(教程anim.getComponentInvhildren<Animation>();)
(1)分离 : 相对于其邻居 => 采用直接给力
(2)队列 :相对于目标 => temp = want - now
(3)聚集 : 相对于其邻居 => 直接给力
GetNeighbors : Physi
dir = transform.position - neighbors.position
sf = dir.normalized / dir.magnitude
sf *= weight
sum += sf;
a = sum / m;
v += a * Time.deltaTime;
transform.translate(v * Time.deltaTime,space.world )
队列的距离与聚集的距离一样。
不加分离的力时采取施加聚合的力。不加队列的力时不加聚集的力