Compound Collision

A Newton physics engine lesson!

A basic moveable, solid collision shape in Newton must be of a convex shape. In order to create a collision that has concave features, you need to “stitch” several convex shapes to create a concave shape. To provide this type of collision, the Newton physics library has the concept of compound collision.

I need a moveable concave type of collision for the cup and stem portion of the catapult. This is where compound collisions come into play. Please see the diagram below to show the steps I had to take to get this in the game.

Setting up a compound collision is easy as A B C and D!

Setting up a compound collision is easy as A B C and D!

  • (A) I built a model of a wedge, to make a wedge collision shape
  • (B) I built a model of the base to make another collision shape (displayed upside down)
  • (C) The wedge collision shapes (top view) were placed around in a circle, along with the base at the bottom
  • (D) Attach the stem (a long box shape) and you have the cup and arm (side view) of the catapult!

I will be showcasing various Newton physics engine concepts in future posts. This one should help you see just how a catapult cup and arm is built in the physics world.

Comments are closed.