- Home /
Delta-Time speeds up when pressing buttons
Hello all!
Im developing a simple click based game with some textures moving around, all the textures are bound by unitys Time.DeltaTime.
My problem is that when i press a GUI.Button i have all the textures moving at that instance speeds up. This problem persists even if i remove all the buttons logic and just have an empty button.
I have tried to limit the FPS to 30 but without result.
anyone encounterd this before?
//Streiner
Where do you move your objects? In Update or in OnGUI? Without seeing the code we can't say what's wrong. Time.deltaTime however doesn't "speed up" unless you play around with the timeScale.
Time.deltaTime is not a constant and therefore should not be used as one.
Answer by Streiner · Nov 27, 2014 at 02:03 PM
Problem was we update the positions in OnGUI, not in Update. Moving the logic to update solved everything, even the gift of life! Thx alot! :)
Your answer
Follow this Question
Related Questions
gui text button dont work 1 Answer
Create 3D GUI Button? 2 Answers
GUI click through? 3 Answers
Button onClick events will not be triggered 1 Answer
Embed GUI Skin in GUI Button 2 Answers