How to remove a physics body in chipmunk sprite?

how can we remove physics body like we remove static body ?

How about
sprite->setPhysicsBody(nullptr);
EDIT:
This is how i do in C++

@smitepatel88 When I do this I get a crash “Assert failed: Component must be non-nil”

For me its working fine v 3.8.1
In latest version i think we have to use addComponent and removeComponent

When I call removeComponent to removing physicsBody, I get “EXC_BAD_ACCESS” error.

Just in case that you havent figured out yet.

sprite->removeComponent(sprite->getPhysicsBody());

im using V3.9

1 Like