A downloadable project
Emscripten Box2D for Construct 2 and 3
- Create collision polygon from image alpha (using hull.js and simplify.js).
- Circle, polygon and box shapes.
- Speed clamp.
- Rotational speed clamp.
- Get exact collision point.
- Dynamic, Static and Kinematic bodies.
- Collision filtering (category bits & mask bits, also collision group index and collision disable from Pre-Solve condition).
- Individual object gravity scale.
- Set world x and y gravity.
- Load the collision hull from a c2 json array. Change the collision shape in-game by loading an array.AsJSON of x and y values into the object.
- Exports collision hull as c2 json array. This package includes a capx collision shape editor example so you can create polygons and set them in-game from the output string.
- Raycast world queries. Get raycast object list with collision point, normal and object UID.
- Set object properties 'globally' by using object UID. For example, find an object using Raycast and then change its properties without having to pick it as you would normally have to using events.
- All joints are demo'd here: link
- Assimilate Joint - demo: link . A totally stable alternative to a weld joint. Join together dozens of objects with no joint fighting!
- AABB world queries (quickly find objects within an area)
- Gravity attractor.
- Compatible with Google closure compiler (Construct 2 Minify export). You don't want people reverse-engineering your project.
What is included in the download:
- Box2D+ plugin for Construct 2.
- Box2D.c3addon for Construct 3.
- Instructions: link.
- Collision polygon editor capx. Demo: link
- Physics joints capx (commented - the one used to create the joints demo).
- Collision disable example capx.
- c3p files for Construct 3 for the above demos.
Please visit the Forum to discuss this plugin and view the devlog.
- This behavior is not compatible with the standard Physics plugin.
- Box2D+ will create a box shape is the created collision shape results in very tightly packed vertices (eg 100px square with >45 vertices).
In order to download this project you must purchase it at or above the minimum price of £5.99 GBP. You will get access to the following files: