Simple scene, I have a world space canvas with two buttons to test 2 functions, I found in the example functions below, functions âreset()â and âJeff()â wonât run when called by the buttons, but the two functions I made called âtest()â and âresetCam()â work when called by the button so those functions then call the functions that didnât work. Why is this? Is this a bug?
public test()
{
console.log("test");
this.Jeff(); //
}
public resetCam()
{
console.log("resetcam");
this.reset();
}
public reset()
{
console.log("reset");
this.localTween = new TWEEN.Tween(this.mainCam.position)
.to(this.camDefaultPos.position, this.lerpSpeed)
.easing(TWEEN.Easing.Cubic.InOut)
.start();
}
public Jeff()
{
this.targetPosition = getWorldPosition(this.target[0].lookOffset);
this.targetPosition.y = this.targetPosition.y + 2;
console.log("Jeff");
this.localTween = new TWEEN.Tween(this.mainCam.position)
.to(this.targetPosition, this.lerpSpeed)
.easing(TWEEN.Easing.Cubic.InOut)
.start();
}
by user 103054507105067008