Hey guys,
I currently have a character that moves around the screen randomly. I am using a tween to achieve this. Since this character also is floating / hovering, I am wondering if it is possible to have his position being tweened currently around the screen (up down left right) and also have his Y bob up and down constantly from another tween, without interfering or resetting the movement tween.
moveCharacter(){
var targetPosition = new THREE.Vector3(this.getRandom(-5,5), this.getRandom(-5,5), this.getRandom(-5,5));
new TWEEN.Tween( this.position )
.to( targetPosition , this.getRandom(200, 500))
.easing( TWEEN.Easing.Cubic.InOut )
.start()
.onComplete(function(){
this.moveCharacter();
}.bind(this));
}
This is how he currently moves.
Thanks guys!