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.
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.