public override void Move()
    {
        Vector3 dir = Vector3.zero;

        dir                += flock.GetDir();
        dir                += obstacleAvoidance.GetDir();
        dir.y               = 0;
        directionForGizmo   = dir;
        transform.position += dir * speed * (DistanceToLeader() / 10) * Time.deltaTime;
        if (flags.isCloseToLeader == false)
        {
            transform.LookAt(myLeader);
        }
    }
 void Update()
 {
     _dir = flock.GetDir();
     _entityModel.Move(_dir);
 }
Exemple #3
0
 void Update()
 {
     _dir = _flock.GetDir();
     _model.Move(_dir);
 }
 public void FlockingRun()
 {
     _dir = _flock.GetDir();
     _model.Move(_dir);
 }