Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ammo Physics (3D Physics Extension) #1974

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Brackets-Coder
Copy link

@Brackets-Coder Brackets-Coder commented Feb 25, 2025

A work-in-progress extension based on the ammo.js physics library, which is based on the C++ Bullet Physics SDK.

The goal is to provide feature-complete, advanced, and performant 3D physics in a simple-to-understand manner. This extension aims to be consistent with Box2D and Simple3D.

I expect several more months of work before this is ready for release, but I'm putting a Draft PR here just because I can :)

video.mp4

Task list:

  • All shape types:
    • Boxes
    • Spheres
    • Cylinders
    • Cones
    • Capsules
    • Planes
    • Convex Hulls
    • Triangle Meshes
    • Compound bodies
  • Physical Materials (friction, restitution, etc.)
  • Constraints (All types)
  • Collision:
    • Collision Detection
    • Raycasting (partial support)
    • Enable/disable collision response
  • Manual Impact forces (like "push with force" block in Box2D)
  • Player Management?
  • Vehicle support?
  • Soft bodies?

Miscellaneous Notes Mainly for Moderators:

  • I'm trying to take a more object oriented approach that's more professional, hope this one is easier to review than my previous extensions.
  • ChatGPT was used to assist and enhance the making of this extension, simply because I couldn't find good quality, coherent documentation of Ammo.js, and attempting to figure out how to use it via the developer inspector isn't fun. It did not write the code for me and I am still the main author of this extension. It just helped me learn Ammo.js. Hope this doesn't cause conflicts.
  • It includes multiple large (but minified) libraries... hope this isn't a problem
  • Has some weird (but necessary) ESLint workarounds for Ammo initialization. Also hope this isn't a problem.
  • I can't decide if this should go by Simple3D or Box2D in the gallery. If a moderator could give me some advice that'd be great. I put it by Box2D because they seem to fit into similar categories.
  • I haven't made documentation, sample projects, etc. yet
  • I'm not good at graphic design so if someone wants to make a banner/thumbnail that'd be great
  • Still have to incorporate Scratch.Cast where necessary, right now I'm just working on functionality though

Put an emoji (👍, 🚀) if you like this extension

@Brackets-Coder Brackets-Coder marked this pull request as draft February 25, 2025 22:31
@github-actions github-actions bot added the pr: new extension Pull requests that add a new extension label Feb 25, 2025
@WAYLIVES
Copy link

WAYLIVES commented Mar 4, 2025

Wow! It's very cool and useful for people like me)

@Brackets-Coder
Copy link
Author

Wow! It's very cool and useful for people like me)

Thank you! I've been making steady progress, but it probably won't be ready for a while (which is why this is a draft).

@Brackets-Coder Brackets-Coder changed the title Ammo Physics Ammo Physics (3D Physics Extension) Mar 19, 2025
@Brackets-Coder
Copy link
Author

Added partial support compound bodies - all child shape types.
Also working on convex and concave mesh support... it'll be a while.

@WAYLIVES
Copy link

wow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new extension Pull requests that add a new extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants