Bonjour, j'ai un soucis avec une variable dont la valeur sur chrome n'es pas nul mais sur firefox cette valeur vaut NaN donc je ne comprend pas trop.
Voila la variable :
rotation = Math.atan2(possourisY - this.y, possourisX - this.x);
et la function complète:
PlayerCanon.prototype.update = function () {
rotation = Math.atan2(possourisY - this.y, possourisX - this.x);
this.x = posX+(rayonTourelle*Math.cos(rotation));
this.y = posY+(rayonTourelle*Math.sin(rotation));
};