At 6:10 PM +1100 1/5/06, The Atherton residence wrote:
I am new to realbasic and am learning by writing a program to simulate the game of lawn bowls. All is ok except that I (seem to) get multiple calls to the collision event handler when spheres collide at "low" speeds - with unpredictable results. I can fix this by changing one of the sprite's groups to 0, but of course, this is unsatisfactory. Is this a bug or is it just a symptom of "proximity management"?
It's not a bug, but I don't understand what you mean by proximity management. It is simple: on each frame, the Collision event fires for each 2 sprites that are colliding. I imagine that when your spheres are moving at low speeds, then they collide for more than one frame.
However, the collision event doesn't give you enough information to simulate the interaction of colliding spheres anyway. You need to do your own little physics simulation, which will involve (among other things) keeping track of the velocity of each ball. If the Collision event fires for two balls that are already moving away from each other (because you handled the collision last frame), then you can just ignore it.
Best, - Joe -- Joseph J. Strout [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
