Single object that when shaken falls apart

Official forum for the Chipmunk2D Physics Library.
mobilebros
Posts: 90
Joined: Tue Aug 04, 2009 9:53 am
Contact:

Re: Single object that when shaken falls apart

Post by mobilebros »

Instead of this:

Code: Select all

 cpBody* blockBody = cpBodyNew(200.0, INFINITY);
you want something like this:

Code: Select all

cpBody* blockBody = cpBodyNew(200.0, cpMomentForPoly(200, 4, verts, cpvzero));
This should cause it to rotate as you would expect.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests