Hint: Use the ball''s radius.
- Rob Loach
Current Project: Go Through Object-Oriented Programming in C++ by Robert Lafore
"Do or do not. There is no try."
- Yoda
Collision between station bricks and a moving ball...
hmmmm get a vector to the bricka nd just see if its length is less than the balls radius?
-Shane
-Shane
Determine the quantum probability of the bricks edge existing over top of the balls edge, and then calculate a new probility field for both brick and ball based all of the itty bitty atomic and electromagnetic interactions, and update the respective positions accordingly. I think this is how Arkanoid did it.
Hmm... as far as the corner problem with the ball colliding with more than one brick goes, why not check for collisions with all bricks within a certain radius from them ball (to cut down on the # of collision tests), but don''t respond to a collision immediately, instead put all of the bricks that a collision is detected with into a list and once you have finished all of your collision tests, use some kind of heuristic to determine which brick to use for processing your collision response.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement