Custom Physics Body or Camera issues

Does using the PhysicsBodyEditor to create Custom Physics bodies slow down the game?All the other part of the code seems to be fine as I have tested it in multiple ways. Either the Camera or Custom Physics Body is slowing down my game. Any suggestions, please?

Yes, this is the “Custom Shaped Physics Body” which affects the performance. Actually in this case you are always using multiple polygons joining-up to act as a single body. So in real sense you are using multiple bodies in this case instead of a single one; which affects drastically on game performance.

@bilalahmed_cs

I cannot use box body or circle body because my sprites have a lot of curves.Is there an alternative?

In PhysicsEditor they have the option for reducing the number of polygons with shape accuracy pay-off. Try using an optimum value there

@bilalahmed_cs

I came to know that the Integrated Physics in cocos2dx v3.x itself slows down the game. Is that true?

I dont think its a wise choice to use some external custom library rather then those provided in cocos2d-x by their experts.
Well for your case u can also try “The chain shape”, available in cocos instead of using PhysicsEditor. Yes it’ll dig u out for some real effort.

For objects that have a lot of curves, you might be able to get a good physics mapping of the sprite and a performance improvement by using a single body with multiple circle shapes of varying sizes offset from the physics body.

A third party tool is great to help reduce the time it takes to implement physics…

But for some simple game objects, just opening photoshop and laying circles in a layer above the sprite and jotting down the offset position from the center of the image and radius of each circle can be a quick process. Then add each circle shape with the required offsets to your main body.