GB2ShapeCache-x for V 3.2


#1

If any one is interested, the conversion to GB2ShapeCache-x for v 3.2 can be downloaded here:

http://www.redtgames.com/blog/gb2shapecache-x-for-cocos2d-x-v3_2/

Please feel free to make any changes and let me know.

Thanks @AndreasLoew for the great work :smile:

Thanks,
Saket


#2

Thanks - this is awesome.


#3

Hi, is there a version for chipmunk?


#4

Send me the 2.x version, I can convert it for you!


#5

We’ve recently updated PhysicsEditor. Including an updated version of the shape cache that works with cocos2d-x out of the box. We’ve renamed the class to PhysicsShapeCache - and it should really be easy to use.

I’ve created a github repository containing the official exporters:

The use of the PhysicsShapeCache is simple:

  1. Load the shapes

    // Load shapes
    shapeCache = PhysicsShapeCache::getInstance();
    shapeCache->addShapesWithFile(“shapes.plist”);

  2. Create a sprite and attach it’s body

    auto sprite = Sprite::create(“banana.png”);
    shapeCache->setBodyOnSprite(“banana.png”, sprite);
    sprite->setPosition(pos);
    addChild(sprite);

An example project can be found here:

Full tutorial is coming soon.


#6

@AndreasLoew
I need Box2D generic loader. But it’s not compiles with latest cocos2d-x v3.14.
Created bug here https://github.com/CodeAndWeb/PhysicsEditor-Loaders/issues/8


#7

@AndreasLoew ?


#8

Since generic-box2d-plist-cocos2d-x is now not supported officially(so Box2D official loader for PE will not work with latest cocos2d-x): https://github.com/CodeAndWeb/PhysicsEditor-Loaders

I’m looking for solution. @Meir_yanovich maybe you can help with this? I’ve found your loader https://github.com/meiry/PhysicsEditor-_cocos2d-x-ver3-loader but it’s looks like outdated. Do you have the latest version? I’d really appreciate for any help. Thank you in advance.

Or current topic starter solution works well and tested? My team just needs a well tested class…