Detecting collision with two or more shapes with Chipmunk

The cp.SegmentShape was added to a staticBody ,cp.BoxShape was added to cp.Body.

How to detect collision with the cp.SegmentShape and the cp.BoxShape,alse I want to know

how to create a physicssprite without the influence of gravity?

Thanks for helping!

Personally, I think applying a constant upward force to flyers is a nice solution. Not only is it simple to do with a single call to cpBodyApplyForce, it’s pretty realistic too. After all, planes and helicopters don’t fly because gravity doesn’t apply to them - they fly because they apply upward forces.

for collision callbacks, http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#CollisionCallbacks-HandlerAPI

TKS!
The question has been resolved.
But I have a new problem

How to rotate the shape of a physicsSprite(this.createPhysicsSprite)?

PhysicsSprite can be rotated , but the shape of the physicsSprite can not .

I want to rotate them together ,and running like a clock pendulum?

there is a flag in physicsSprite called “_ignoreBodyRotation”, if it is set to false, then the sprite will rotate according to the physics body and vice versa

The “_ignoreBodyRotation” is set to false in my case, but I want the shape or body will rotate according to the physics sprite .

See the attachment please!

The shape will not rotate according to the physics sprite???

Did you override some of the physics sprite’s methods?