Quote:
Original post by deffer Quote:
Original post by gorogoro
So I changed the Update code to something like this:
*** Source Snippet Removed ***
But that if is really really ugly. And things are kept hard coded. :s
I didn't mean to clamp it in here, but immediately when you're geting the value from the timer (possibly in the main loop). This kind of hardcoding is well known - it enforces slowdown of the gameplay when desired frame rate cannot be achieved.Quote:
Original post by gorogoro
By the way with this if statment the thing works just fine.
Good for you!
Now go fix that mass/force issue I was bugging you about before.
~def
ARGH! I'm freaking out and running out of time! I don't now how to fix this stuff :p. Because the value 0.0065 (if(elapsedTime > 0.0099)elapsedTime = 0.0065) is working on my computer. But who garanties that it is still going to work on other computer or even at XBox360?? :S DAmned.
I'm looking to the files, with lot of values, and I don't now what to do. This elapsedTime is messing me a lot.
Here is the code I'm using to calculate the elapsedTime:
static double lastTime = Core::GetTimer().GetTimeSec(); double curDeltaTime = Core::GetTimer().GetTimeSec() - lastTime; // update last time lastTime += curDeltaTime;
Wich is done at every rendering step!
The elapsedTime is the lastTime variable.