QUESTION: In an application, where is the appropriate place to put the code to interact with the Body objects?
By 'interact' I mean
- Get position
- Determine actions
- Apply impulse
Would it be appropriate to use the step() method to process the interactions?
I'm guessing responding to collisions would be done in the listeners.
Background:
Disclosure: I'm very new to JBox2D, and haven't used Box2D at all.
I'm using the Testbed JAR in my application so that I can see the Bodies interact.
The Body objects are controlled by simple AI, not user input.
I skimmed through the box2d v2.3.0 user manual to get a basic understanding of the objects in the world.
I didn't find any hints on where to put the decision logic.