Custom Hitboxes are Giving me a Hard Time
Hi everyone,
I'm trying to create a custom hitbox for the robot shown below, and it's giving me the "valid shape file was not selected" message. From what I've heard, Gamesalad uses a black-and-white PNG system for custom hitboxes, and it previously used JSON, but neither have worked for me.
See attached the robot sprite and hitbox. Gamesalad rejected the hitbox when I tried to submit it.
For context, the white box is 100x100 to abide by the game's spacing. Auto-trace won't work well for movement in the stages.
Comments
GameSalad doesn't do image based custom hitboxes, you will need to use the JSON based ones. Creator 2 has a tool to automatically generate hit boxes from images based on transparency. Let me know if you need more detail on that!
@adent42 I've tried to do JSON but it hasn't worked yet, I'm just looking for a simple 100x100 square, and I have the software to do it, but it has not accepted it whenever I tried to submit one.
Here's the JSON code for what I want to add in, do you know how I can make Gamesalad accept it?
{"rigidBodies":[{"name":"Square","imagePath":null,"origin":{"x":0,"y":0},"polygons":[[{"x":0,"y":0},{"x":100,"y":0},{"x":100,"y":100},{"x":0,"y":100}]],"circles":[],"shapes":[{"type":"POLYGON","vertices":[{"x":0,"y":0},{"x":100,"y":0},{"x":100,"y":100},{"x":0,"y":100}]}]}],"dynamicObjects":[]}
Here's the readable version:
{
"rigidBodies": [
{
"name": "Square",
"imagePath": null,
"origin": {
"x": 0,
"y": 0
},
"polygons": [
[
{
"x": 0,
"y": 0
},
{
"x": 100,
"y": 0
},
{
"x": 100,
"y": 100
},
{
"x": 0,
"y": 100
}
]
],
"circles": [],
"shapes": [
{
"type": "POLYGON",
"vertices": [
{
"x": 0,
"y": 0
},
{
"x": 100,
"y": 0
},
{
"x": 100,
"y": 100
},
{
"x": 0,
"y": 100
}
]
}
]
}
],
"dynamicObjects": []
}
Thank you for the help!