Tag Info

New answers tagged


Simple, give the monster a hspeed, vspeed speed components, after that find the direction to the next point in the path with the tangent, which if I recall correctly would be y2-y1/x2-x1, being x2 and y2 the point of the next position and x1 and y1 the monster one. After that use the cosinespeed to find the x component or hspeed and -sinespeed for the y ...


Your delta will be always equal to 1/60, but that's not what delta time is. Delta is the time that passed between current and previous call. Here's an example: double delta; double currentTime, lastTime; while (doingStuff) { currentTime = getCurrentTime() //You have to define this method somewhere delta = currentTime - lastTime; lastTime = ...

Top 50 recent answers are included