-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This plugin exports the rigidbody world from a Blender scene. It exports to a JSON-based format that closely resembles the structure of the bpy API.
The main goal of this plugin is to have a straightforward and easy-to-use way to export 2D collision shapes for use in GameMaker.
The plugin exports the scene's gravity as found under Scene
> Gravity
.
The general simulation parameters found under Scene
> Rigid Body World
are also exported. These are: time scale, steps per second and solver iterations.
The mesh is the most versatile collision shape and allows several face loops in a single mesh instance (great for static scenery/masks).
What actually gets exported in this case are loop cycles.
Mesh collision shapes are always exported as edge/chain shapes.
Some models have a very complex shape.
The requirement for a polygon shape is that it should be convex.
For a more complex concave shape this can be solved by using Mesh
> Clean up
> Split Concave Faces
This may result in polygon shapes with >8 points.
The plugin shows a warning message when this is the case.
The convex hull shape generates a new mesh shape that surrounds the mesh while being convex in shape.
To achieve this, the plugin first makes a copy of the current mesh and applies the Vertices
> Convex Hull
operator on it, then cuts the vertices using Tools
> Knife Project
with the Cut Through
option enabled.
This shape is eventually converted to a mesh shape that is exported as a convex polygon fixture with at most 8 vertices.
These all map to a circle shape in 2D.
Corresponds to a box shape in 2D.
These correspond to joints in GameMaker.
- Fixed - Not really an equivalent joint in GM (Weld joint?)
- Hinge/Point - Revolute joint
- Slider - No equivalent
- Piston - Prismatic