Hello everyone,
I have a problem when setting an object to an specific angle rotation in one axis.
if (storageAvailable('localStorage')) {
anguloInicialIntensity = localStorage.getItem('angle');
console.log("init: " + localStorage.getItem('angle'));
//this.entity.localEulerAngles().y = parseFloat(anguloInicial);
//this.entity.rotate(90,localStorage.getItem('angle'),0);
//this.entity.setEulerAngles(90,parseFloat(localStorage.getItem('angle')),0);
this.entity.setEulerAngles(90,localStorage.getItem('angle'),0);
console.log("x: " + this.entity.getEulerAngles().x + "an y: " + this.entity.getEulerAngles().y + "z: " + this.entity.getEulerAngles().z);
}
i have tried this options but none of them work. As you can see in the following screenshot both .y and .z do what they want, instead of positioning where i told them to be:
(y should be equal to init. In this picture: y = 0.535)
I do not know what else to do
Thank you for your time!