Just noticed a little something. For now stick with the Forward Euler method, and the dt is NOT delta time. It is a time step (anywhere between 1/60 to 1/1000). To involve delta time, you do this:
VB Code:
New_Time = timeGetTime Delta_Time = (New_Time - Current_Time) / 1000 Current_Time = New_Time If Delta_Time > 0.25 Then Delta_Time = 0.25 Accumulator = Accumulator + Delta_Time While (Accumulator >= Time_Step) Accumulator = Accumulator - Time_Step Integrate2D Obj, Time_Step, FORWARD_EULER Time = Time + Time_Step Wend





Mark Thread Resolved
Reply With Quote