bool StartMove() { Vector3[] trajectory = path.NextTrajectory(); if (trajectory == null) { movement.Stop(); } else { movement.SetTrajectory(new Trajectory(mover.position, trajectory[0], trajectory[1], settings.radius), Speed * speedMultiplier); return(true); } return(false); }
void StartMove() { trajectory = new Trajectory(transform.position, targets[pathPosition].position, targets[pathPosition + 1].position, settings.radius); movement.SetTrajectory(trajectory); }