New answers tagged

0

struct Rectangle { //top left corner float ax; float ay; //bottom right corner float bx; float by; }; bool collision(Rectangle A, Rectangle B) { if(A.bx >= B.ax && A.ax <= B.bx && A.ay >= B.by && A.by <= B.ay) { return true; } else { return false } } I'm pretty sure this is the ...


0

If you want to keep using your coroutine approach, you'll want to the coroutine do more work each time it takes a turn, so that it finishes after a smaller number of frames. How much work is enough to finish in a decent amount of time, but small enough that it won't cause a noticeable stutter? That might vary depending on the hardware, or the current load on ...


Top 50 recent answers are included