![]() each vertex object contains an “x” and “y” floating point valueĮxample 1: an object containing 1 normalized polygon consisting of 3 vertices at (0, 0), (1, 0), and (0.each element in the array is an array of objects with the vertex data.each object contains an array “polygons”.If “normalized” is true, set to true if the image isn’t square, false otherwise. If “normalized” is false, this contains the width and height of the image. optional object “size”, consisting of a “width” and “height” value.optional boolean flag “normalized”: flag that the polygon vertex values fall in the range 0->1.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 merged into your game files. Need additional parameters Add custom parameters to global settings, physics bodies or fixtures. You will be asked to select the file containing the collision data you want for your actor. PhysicsEditor is pre-configured with a variety of game and physics engines such as Box2d, Nape, P2 and others. To assign a custom collision shape to an actor, select the Physics->Collision Shape option “Custom”. ![]() Next click the little plus sign and you've made a new. Next, select Actors from the selection bar at the top left (it's the one that looks like a mask). Custom collision shapes consist of one or more convex polygons, each consisting of 3-8 vertices. Open up GameSalad Creator, and open up your project. 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 |