News for hackers. Stuff that matters.
Re:Making Balls Bounce off of Walls in a Labyrinth by joshu on Thursday June 19, 2014 @07:40PM (#7918885)
i think the usual way is to advance the timestep, see if the item penetrates the other item, and then go back and advance half a timestep.

but my point is, you don't need to check the entire world if you are using a quadtree or rtree or whatever.

Re:Making Balls Bounce off of Walls in a Labyrinth by sillysaurus3 on Thursday June 19, 2014 @09:55PM (#7919194)
I don't think that's the usual way, because it will completely miss collisions for fast-moving balls.

They don't need a quadtree or an rtree if the number of objects is fewer than 100.

Also, when using a quadtree/rtree etc with dynamic objects, you'll need to rebalance the tree as objects move around. If the rebalancing is more expensive than the speed gained by using it, then those datastructures can be harmful, not helpful. This is case is relatively rare but something to keep in mind.