Pay for Hesitation: Box2dAS3 Notes

Pages

2010年7月14日 星期三

Box2dAS3 Notes

Some weirdness to the b2ContactListener:
Problem: You can't alter your physics world from any function inside the contact listener.
Answer: Sometimes I like to set a flag and deal with the effects later.

Problem: The same contact might get called twice.
Answer: Not a big deal, just make a plan for it. Again, maybe a good reason to set a flag and deal with it later.


沒有留言: