Collision Shap Invalid JSON data

yoyobid12yoyobid12 Member, PRO Posts: 21

Hello the world,

I have a problem with the custom collision shape... I tried with both of the software avaiable ( Physics Body Editor / Physics Editor) and each time I'me trying to load the data I have a "Invalid Json Data" error.

Do you have a solution ?

Thanks for yoru help.

Good luck with your project.

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited November 2016

    Here are a couple of problems I experienced with this in the past:

    1. I added more than one picture, each with its own collision shape in the one project and exported to one single JSON file. The program allows you to add multiple images to the project but GameSalad doesn't like. It expects one image only in each JSON export.
    2. The collision shape wasn't closed properly, or it had multiple shapes on the one image.

    I used Physics Editor on the Mac. I couldn't get the other one to work/install so I've no experience with that one.

  • SocksSocks London, UK.Member Posts: 12,822

    @KevinCross said:
    Here are a couple of problems I experienced with this in the past:

    1. I added more than one picture, each with its own collision shape in the one project and exported to one single JSON file. The program allows you to add multiple images to the project but GameSalad doesn't like. It expects one image only in each JSON export.
    2. The collision shape wasn't closed properly, or it had multiple shapes on the one image.

    I used Physics Editor on the Mac. I couldn't get the other one to work/install so I've no experience with that one.

    You can have multiple collision shapes/areas for a single actor, Physics Body Editor does it just fine.

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    @Socks said:
    You can have multiple collision shapes/areas for a single actor, Physics Body Editor does it just fine.

    Yeah I saw in the cookbook they use Physics Body Editor which looks like it's built from multiple polygons/shapes but I couldn't get that program to work so have no experience with that one. The biggest problem I had was the multiple images in the one project in Physics Editor and exporting the whole Physics Editor project as one JSON file which contained multiple collisions data for all of the images in my GameSalad project. I imagine this problem would catch out others too as Physics Editor lets you add multiple images to the one project file.

Sign In or Register to comment.