Hi folks
I try to use the Timer for frame independend movement, but whenever I do, my program crashes I tracked the problem down with the debugger, so I am sure it is the timer. This is how I do it:
u32 LastTime = Device->getTimer()->getTime();
The Device is a standard 0.4.2 Irrlicht Device, and yes, it is already initialized. Help plz
Crash using the Timer :(
Sorry if I made you look stupid. I didn't mean to insult you, but you have to admit (at least I do) that some people do not read before they post. Please forgive me if I misthought you were one of them...
Now onto the problem:
I am sure you properly set up the timer, didn't you?. Try only calling ITimer functions or just setting something similar to this
Device->getTimer();
TheTime=YourTimer->getTime();
Finally if you're fed up write to isometric god and tell him you haven't been able to use his code. Maybe (high possibility) he will tell you more than what I can do
Now onto the problem:
I am sure you properly set up the timer, didn't you?. Try only calling ITimer functions or just setting something similar to this
Device->getTimer();
TheTime=YourTimer->getTime();
Finally if you're fed up write to isometric god and tell him you haven't been able to use his code. Maybe (high possibility) he will tell you more than what I can do
I found the bug
I used the Timer in the Event Receiver, which is apparently already called before the Device is properly loaded. Thats what made the app crash. After pulling the call out of the Event Receiver, everything worked fine. I am writing this down here so people who actually use the search function (like us ) may find this hint nothing is worse than googling for a problem and finding a forum thread with "nm, problem solved."
I used the Timer in the Event Receiver, which is apparently already called before the Device is properly loaded. Thats what made the app crash. After pulling the call out of the Event Receiver, everything worked fine. I am writing this down here so people who actually use the search function (like us ) may find this hint nothing is worse than googling for a problem and finding a forum thread with "nm, problem solved."