Collision between station bricks and a moving ball...

Started by
12 comments, last by Codejoy 20 years, 11 months ago
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
Rob Loach [Website] [Projects] [Contact]
Advertisement
hmmmm get a vector to the bricka nd just see if its length is less than the balls radius?

-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.
---------------------------------------------------There are 10 kinds of people in the world:Those that understand binary, and those that dont...Mage

This topic is closed to new replies.

Advertisement