I have a doubt regarding the goTo Function in javascript inside creative experience?

is it possible to make motion  my current actor to targetactor1 to first and then to targetactor2 in a single button click using 2dbutton.

My code 

beScript.onUIClick = function (iEvent) {
    var exp = this.getExperience();
	var currentactor = exp.getActorByName("Body_2R2933X9572 A",true);
	var targetactor1 = exp.getActorByName("MIDPOINT1",true);
	var targetactor2 = exp.getActorByName("MIDPOINT2", true);
	console.log(currentactor.name);
	console.log(targetactor1.name);
	console.log(targetactor2.name);
	if(this.nav.isVisible()== true){
		currentactor.Motion.goTo(targetactor1);
		currentactor.Motion.goTo(targetactor2);
        this.nav.visible = false;
	}
};