Collision Events in APE

I am trying to create two objects in an application that I am working on that uses the APE physics engine by Alec Cove.

  1. I want collisions between boxes (RectangleParticles in the engine) to happen realistically. Right now, boxes collide as you would expect, but they do not rotate whatsoever. I really have no idea how to implement this.

  2. I’ve extended the RectangleParticle class as a GameBox class so that I may add additional attributes to them. I’ve added a hitPoints attribute that is meant to determine the current strength of a box. This should decrease upon collision. I am unsure how to implement this, because I am not sure how to determine the amount of damage that a box should take. I figure it might work to use the depth of the collision that is calculated by the APE engine, and just make it proportional to that. Any suggestions?