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.
沒有留言:
張貼留言