Hi!
I'm playing with chipmunk and I'm trying to model objects that occupy the same cpSpace, some of which respond to gravity and some of which don't. But I'm not sure how best to model it.
Imagine a scenario:
* some terrain outline (a static body that doesn't ever move)
* a boulder (an active body that does move, collides with other objects in the space, and responds to some global gravity)
* a bird (an active body that does move, collides with other objects, but doesn't get affected by gravity)
In order for all these objects to collide and bounce off of each other correctly, I believe they all need to be part of the same cpSpace object. However, if the cpSpace has a global gravity force defined, it will apply it to all objects, including the bird, which is not what I want. What's the best way to go around this problem?
1) nix the gravity vector from the cpSpace object and apply gravity manually using cpBodyApplyForce to all objects that need it
2) apply a negative gravity force to all objects that should defy gravity (ie. bird) but keep the global gravity vector in cpSpace
3) ??? is there a better way? it seems clumsy to me to do this manually, but I don't see anything simpler.