Hello,
Iām working on scripts which move the camera around characters.
The behaviour is to : zoom on a character when I click on it (it works) and make the āreturn buttonā in html show itself.
When I click on the return button, the camera return on its original position.
Problem :
For it, I use on the start function of my component an addEventListener, like this :
this.returnBtn = document.getElementById("return-btn")
this.returnBtn.addEventListener("click", this.retourCamera)
The HTML button is correctly found, the function too, but problem :
All of my properties are āundefinedā when I call the this.retourCamera with the addEventListener.
I review my code to be sure : correct name, correct use of this etc
But in red, the properties when I call the zoomCamera function
And in green when I call the retourCamera function (itās the same console.log) :
console.log(this.ourCamera, " ", this.ourLookAt, " ", this.disableZooming)
Does somebody has an idea ?
by user 224464722878005248