Hi,
I have quite a newbie question.
When my character is sitting down, should I remove standing body and then add sitting body?
(I think this is quite poor. But, this is my only idea) or just use a single body. I have tried two bodies with activate/sleep and add/remove.
I've read many samples but they are focusing on physics, not how to handle dynamic state changes.
Is there a general rule to manage many states of character in Chipmunk?
Thank you.
Sung Kim.
Should have two different body?? (newbie)
-
- Posts: 1
- Joined: Mon Jan 09, 2012 6:12 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Should have two different body?? (newbie)
Generally you want to avoid sudden state changes in the physics like that or at least perform them carefully so that you avoid collisions with new objects. In general though yes, you will have to remove the old body/shapes and replace them with new ones representing the new state.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 15 guests