Can somebody please explain what I am doing wrong here?
OrbitCamera.prototype.tweenCamera = function () {
tween.on('complete', function () {
console.log('tween completed');
this.test();
});
};
OrbitCamera.prototype.test = function () {
console.log('um, actually this is a function');
};
I excluded the tween start etc and it all works and it logs “tween completed”, but no matter which function I call after that I keep getting above error and I have no idea why.