https://github.com/d954mas/defold-box2d
defold-box2d bindings
https://github.com/d954mas/defold-box2d
Last synced: 4 months ago
JSON representation
defold-box2d bindings
- Host: GitHub
- URL: https://github.com/d954mas/defold-box2d
- Owner: d954mas
- License: mit
- Created: 2021-06-10T09:22:16.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-05T09:01:43.000Z (about 1 year ago)
- Last Synced: 2025-01-31T18:52:58.461Z (4 months ago)
- Language: C++
- Homepage:
- Size: 5.43 MB
- Stars: 36
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-defold - Box2D
README
# Box2D for Defold
Box2D lua bindings for the Defold Game Engine.
I tried to keep the lua api the same as the c++ api when possible.
If you like the extension you can support me on patreon.
It will help me make more items for defold.[](https://www.patreon.com/d954mas)
[](https://www.buymeacoffee.com/d954mas)
Try the demo: https://d954mas.github.io/defold-box2d/
# Table of Contents
- [Box2D for Defold](#box2d-for-defold)
* [Installation](#installation)
* [Box2D](#box2d)
* [Limitations](#limitations)
* API:
+ [Extension](doc/base.md)
+ [World](doc/World.md)
+ [DebugDraw](doc/DebugDraw.md)
+ [Contact](doc/Contact.md)
+ [Shape](doc/Shape.md)
+ [FixtureDef](doc/FixtureDef.md)
+ [Fixture](doc/Fixture.md)
+ [BodyDef](doc/BodyDef.md)
+ [Body](doc/Body.md)
+ [Joint](doc/Joint.md)
- [RevoluteJoint](doc/joints/RevoluteJoint.md)
- [PrismaticJoint](doc/joints/PrismaticJoint.md)
- [DistanceJoint](doc/joints/DistanceJoint.md)
- [PulleyJoint](doc/joints/PulleyJoint.md)
- [MouseJoint](doc/joints/MouseJoint.md)
- [GearJoint](doc/joints/GearJoint.md)
- [WheelJoint](doc/joints/WheelJoint.md)
- [WeldJoint](doc/joints/WeldJoint.md)
- [FrictionJoint](doc/joints/FrictionJoint.md)
- [MotorJoint](doc/joints/MotorJoint.md)
+ [Box2dManifold](doc/Box2dManifold.md)
+ [Box2dWorldManifold](doc/Box2dWorldManifold.md)
+ [Box2dContactImpulse](doc/Box2dContactImpulse.md)
+ [Box2dFilter](doc/Box2dFilter.md)
+ [Box2dProfile](doc/Box2dProfile.md)
+ [Box2dMassData](doc/Box2dMassData.md)## Installation
__1)__ Add defold-box2d in your own project as a Defold library dependency. Open your game.project file and in the dependencies field under project add:
Defold >=1.8.0
https://github.com/d954mas/defold-box2d/archive/refs/tags/1.0.3.zip
Defold < 1.8.0
https://github.com/d954mas/defold-box2d/archive/refs/tags/1.0.2.zip
> :warning: This extension removes default box2d, that means you have to remove all the Collision Object components from your collections and Game Objects
## API
Supports emmylua. box2d_header.lua## Box2D
If you need info about how Box2D works, read its documentation.
https://box2d.org/documentation/Box2d version: 2.4.1
## Limitations
__1)__ No binding for b2Vec2. Use defold vector(vmath.vector3)
__2)__ No binding for some b2World functions.
void SetContactFilter(b2ContactFilter* filter);
const b2ContactManager& GetContactManager() const;__3)__ No binding for some b2Joint functions.
virtual void Draw(b2Draw* draw) const;