[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - Single object that when shaken falls apart

Single object that when shaken falls apart

Official forum for the .

Single object that when shaken falls apart

Postby Pedagogic368 » Mon Aug 23, 2010 4:02 pm

Hello - I have set up a project in Cocos2d that I want to use Chipmunk to help complete. I have a sprite object that I want to "break apart" when the user shakes the device. It would be like the pyramid topple demo, (the sprite representing the pyramid object) but with fewer components. - Can anyone guide me as to where I should start? I have reviewed the demo and online tutorials, but have yet to find a good example that shows an actual object being broken into pieces that fall onto the ground. Thanks in advance for any suggestions.
Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Re: Single object that when shaken falls apart

Postby slembcke » Tue Aug 24, 2010 8:11 am

Just make a bunch of rigid bodies and collision shapes for different parts of the object you want to fall apart and let the fall to the ground.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Single object that when shaken falls apart

Postby Pedagogic368 » Tue Aug 24, 2010 8:39 am

Can you point me to a demo. I went over the pyramid tumble but it looks like it is creating an object mathematically - I can understand the concept of creating different rigid bodies, each with collision points, do not have a good grasp on how this is done in chipmunk. Thanks so much for taking the time to respond.
Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Re: Single object that when shaken falls apart

Postby slembcke » Tue Aug 24, 2010 11:37 am

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Single object that when shaken falls apart

Postby Pedagogic368 » Tue Aug 24, 2010 12:25 pm

Thanks - I will start from here. I really appreciate your response!!
Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Re: Single object that when shaken falls apart

Postby Pedagogic368 » Tue Aug 24, 2010 6:10 pm

Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Re: Single object that when shaken falls apart

Postby mobilebros » Tue Aug 24, 2010 9:29 pm

1. No you do not need to do that, and I cannot see any error in your code that would make it fall through.... strange. [Edit: perhaps its passing right through it because it is moving very fast?]

2. You need to "step" the space to get anything to actually move, why don't you just not step the space until the trigger you're describing happens.
mobilebros
 
Posts: 90
Joined: Tue Aug 04, 2009 9:53 am

Re: Single object that when shaken falls apart

Postby Pedagogic368 » Tue Aug 24, 2010 10:06 pm

Thanks - I will look into how to how to "step" the space works - Then set up my trigger - Thanks for the hint - I can 't wait to see how this all works out!!
Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Re: Single object that when shaken falls apart

Postby mobilebros » Wed Aug 25, 2010 10:22 am

mobilebros
 
Posts: 90
Joined: Tue Aug 04, 2009 9:53 am

Re: Single object that when shaken falls apart

Postby Pedagogic368 » Wed Aug 25, 2010 5:16 pm

Pedagogic368
 
Posts: 6
Joined: Mon Aug 23, 2010 3:28 pm

Next

Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron