![]() Click on the magic wand icon to auto-trace your image. Click the Add sprites button to load your actor’s image. Restart the program, and set the Exporter to GameSalad. Only do this if you’re very sure about wanting that effect).įor example, an object containing 1 polygon consisting of 3 vertices at (0, 0), (1, 0), and (0. Run PhysicsEditor, open preferences, and set the Custom exporter directory to the folder gamesalad is in. ![]() (Note: technically, the x and y values can be smaller than 0 and larger than 1, but that means that collision with your actor will happen before the actor appears to collide on the screen.the x and y values should be between 0 and 1 (inclusive), with 0 being the left/bottom of the actor’s image, and 1 being the right/top of the image.each vertex object contains an “x” and “y” floating point value.each element in the array is an array of objects with the vertex data.each object contains an array labeled “polygons”.array labeled “rigidBodies”, with each element being an object:.The data file is in JSON format, with the following layout: NOTE 2: if you need to re-import the vertex data, select rectangle or circle as a collision shape, and then custom again. NOTE 1: after you import the data, the file will no longer be needed the data will be imported into your game files. You will be given a dialog that lets you choose a file that defines the polygon and vertex data for the collision shape. To assign a custom collision shape to an actor, select the Physics->Collision Shape option “Custom”. You will be asked to select the file containing the collision data you want for your actor. Custom collision shapes consist of one or more convex polygons, each consisting of 3-8 vertices. Custom collision shapes allow you to use a shape other than a rectangle or circle to define how actors collide with each other.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |