yes the fact is that i was trying to rotate the camera in this script but i noticed the angles being rotated weren’t being calculated good. So the point is : when i execute code above I get 3 “ein” results… Its like frame 1 , 2 and 3 where launched simultaneous and don’t even noticed i switched the if statement off. As far i am concerned the Frame 1 Update function is done completely before Frame 2 Update function start… so I am expecting just ONE " ein " result and i don’t get why I got three of them… I posted this simple question because i forgot smething that seems very important on the code part of Unity and maybe this could help any other newbie coders.
hello , i just solved and very sorry about you losing the time… I am saying the problem and the solution if any new coders uses as a tip.
The problem was what i told at the first post.
The thing is that the “activarotacionI” was fired to “true” by a button press… be aware guys of a button press or whatever action performed under update function, because it will run over and over until released. Counting 200fps a Left click can perform tons of update actions.
I just brute forced it by :
if (Input.GetKey (KeyCode.LeftArrow)) {
if (flying == false){
flying = true;
activarotacionI = true;
}
}
And also in the update function i updated the rotation by this :